v1beta3

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2022 License: Apache-2.0 Imports: 11 Imported by: 4

Documentation

Overview

Package v1beta3 is list of k8s objects for refunc

+k8s:deepcopy-gen=package,register +groupName=refunc.refunc.io

Index

Constants

View Source
const (
	LabelResType  = "refunc.io/res"
	LabelName     = "refunc.io/name"
	LabelHash     = "refunc.io/hash"
	LabelSpecHash = "refunc.io/specHash"
	LabelUID      = "refunc.io/uid"

	LabelLambdaVersion = "lambda.refunc.io/version"
	LabelLambdaName    = "lambda.refunc.io/name"

	AnnotationLambdaConcurrency = "lambda.refunc.io/concurrency"

	LabelRunner        = "refunc.io/runner"
	LabelRunnerIsReady = "refunc.io/runner-ready"

	LabelExecutor        = "refunc.io/executor"
	LabelExecutorIsReady = "refunc.io/executor-is-ready"

	// Label to select operator
	LabelTrigger     = "refunc.io/trigger"
	LabelTriggerType = "refunc.io/trigger-type"

	// Annotations to enable API compatible features
	AnnotationRPCVer = "refunc.io/rpc-version"
)

well known labels

View Source
const (
	FuncdefKind       = "Funcdef"
	FuncdefPluralName = "funcdeves"
)

CRD names for Funcdef

View Source
const (
	FuncinstKind       = "Funcinst"
	FuncinstPluralName = "funcinsts"
)

CRD names for Funcdef

View Source
const (
	// GroupName is the group name use in this package.
	GroupName  = "k8s.refunc.io"
	Version    = "v1beta3"
	APIVersion = GroupName + "/" + Version
)

Third party resources group & version

View Source
const (
	TriggerKind       = "Trigger"
	TriggerPluralName = "triggers"
)

CRD names for Funcdef

View Source
const (
	XenvKind       = "Xenv"
	XenvPluralName = "xenvs"
)

CRD names for Runner templates

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme

	// SchemeGroupVersion is the group version used to register these objects.
	SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: Version}
)

handle scheme

View Source
var CRDs = []struct {
	Name string
	CRD  *apiextensionsv1beta1.CustomResourceDefinition
}{

	{
		FuncdefPluralName,
		&apiextensionsv1beta1.CustomResourceDefinition{
			ObjectMeta: metav1.ObjectMeta{
				Name: FuncdefPluralName + "." + GroupName,
			},
			Spec: apiextensionsv1beta1.CustomResourceDefinitionSpec{
				Group:   SchemeGroupVersion.Group,
				Version: SchemeGroupVersion.Version,
				Scope:   apiextensionsv1beta1.NamespaceScoped,
				Names: apiextensionsv1beta1.CustomResourceDefinitionNames{
					Plural:     FuncdefPluralName,
					Kind:       FuncdefKind,
					ShortNames: []string{"fnd"},
				},
			},
		},
	},

	{
		XenvPluralName,
		&apiextensionsv1beta1.CustomResourceDefinition{
			ObjectMeta: metav1.ObjectMeta{
				Name: XenvPluralName + "." + GroupName,
			},
			Spec: apiextensionsv1beta1.CustomResourceDefinitionSpec{
				Group:   SchemeGroupVersion.Group,
				Version: SchemeGroupVersion.Version,
				Scope:   apiextensionsv1beta1.NamespaceScoped,
				Names: apiextensionsv1beta1.CustomResourceDefinitionNames{
					Plural:     XenvPluralName,
					Kind:       XenvKind,
					ShortNames: []string{"xe"},
				},
			},
		},
	},

	{
		TriggerPluralName,
		&apiextensionsv1beta1.CustomResourceDefinition{
			ObjectMeta: metav1.ObjectMeta{
				Name: TriggerPluralName + "." + GroupName,
			},
			Spec: apiextensionsv1beta1.CustomResourceDefinitionSpec{
				Group:   SchemeGroupVersion.Group,
				Version: SchemeGroupVersion.Version,
				Scope:   apiextensionsv1beta1.NamespaceScoped,
				Names: apiextensionsv1beta1.CustomResourceDefinitionNames{
					Plural:     TriggerPluralName,
					Kind:       TriggerKind,
					ShortNames: []string{"tr"},
				},
			},
		},
	},

	{
		FuncinstPluralName,
		&apiextensionsv1beta1.CustomResourceDefinition{
			ObjectMeta: metav1.ObjectMeta{
				Name: FuncinstPluralName + "." + GroupName,
			},
			Spec: apiextensionsv1beta1.CustomResourceDefinitionSpec{
				Group:   SchemeGroupVersion.Group,
				Version: SchemeGroupVersion.Version,
				Scope:   apiextensionsv1beta1.NamespaceScoped,
				Names: apiextensionsv1beta1.CustomResourceDefinitionNames{
					Plural:     FuncinstPluralName,
					Kind:       FuncinstKind,
					ShortNames: []string{"fni"},
				},
			},
		},
	},
}

CRDs is collections of ThirdPartyResources

View Source
var ErrUnknownTriggerType = errors.New("refunc: got unknown funcinst type")

ErrUnknownTriggerType indicates that we cannot processed the given triger sepc

Functions

func OnlyLastActivityChanged

func OnlyLastActivityChanged(left, right *Funcinst) bool

OnlyLastActivityChanged checks two funcinst returns true if only LastActivity is changed

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group-qualified GroupResource.

Types

type Credentials

type Credentials struct {
	AccessKey string `json:"accessKey,omitempty"`
	SecretKey string `json:"secretKey,omitempty"`
	Token     string `json:"token,omitempty"`
}

Credentials provides runtime credentials for funcinst

func (*Credentials) DeepCopy

func (in *Credentials) DeepCopy() *Credentials

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Credentials.

func (*Credentials) DeepCopyInto

func (in *Credentials) DeepCopyInto(out *Credentials)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CronTrigger

type CronTrigger struct {
	Cron string `json:"cron"`
	// time zoneinfo location name
	Location string `json:"location"`
	// Args is passed to function
	// Extra args will be appended to args
	// $time: RFC3339 formated time
	// $triggerName: name of trigger
	Args json.RawMessage `json:"args,omitempty"`
	// If enable will save func exec's log or result to s3.
	SaveLog    bool `json:"saveLog"`
	SaveResult bool `json:"saveResult"`
}

CronTrigger is a funcinst that will be scheduled by cron string

func (*CronTrigger) DeepCopy

func (in *CronTrigger) DeepCopy() *CronTrigger

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CronTrigger.

func (*CronTrigger) DeepCopyInto

func (in *CronTrigger) DeepCopyInto(out *CronTrigger)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type EventTrigger

type EventTrigger struct {
	Alias       string   `json:"alias,omitempty"`
	Middlewares []string `json:"middlewares,omitempty"`
}

EventTrigger is a basic trigger for a funcdef

func (*EventTrigger) DeepCopy

func (in *EventTrigger) DeepCopy() *EventTrigger

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventTrigger.

func (*EventTrigger) DeepCopyInto

func (in *EventTrigger) DeepCopyInto(out *EventTrigger)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Funcdef

type Funcdef struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`

	Spec FuncdefSpec `json:"spec"`
}

Funcdef is a API object to represent a FUNCtion DEFinition

func (*Funcdef) AsOwner

func (fn *Funcdef) AsOwner() *metav1.OwnerReference

AsOwner returns *metav1.OwnerReference

func (*Funcdef) DeepCopy

func (in *Funcdef) DeepCopy() *Funcdef

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Funcdef.

func (*Funcdef) DeepCopyInto

func (in *Funcdef) DeepCopyInto(out *Funcdef)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Funcdef) DeepCopyObject

func (in *Funcdef) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Funcdef) Ref

func (fn *Funcdef) Ref() *corev1.ObjectReference

Ref returns *corev1.ObjectReference

type FuncdefList

type FuncdefList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []Funcdef `json:"items"`
}

FuncdefList is a API object to represent a list of Refuncs

func (*FuncdefList) DeepCopy

func (in *FuncdefList) DeepCopy() *FuncdefList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FuncdefList.

func (*FuncdefList) DeepCopyInto

func (in *FuncdefList) DeepCopyInto(out *FuncdefList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*FuncdefList) DeepCopyObject

func (in *FuncdefList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type FuncdefSpec

type FuncdefSpec struct {
	// storage path for function
	Body string `json:"body,omitempty"`
	// unique hash that can identify current function
	Hash string `json:"hash"`
	// The entry name to execute when a function is activated
	Entry string `json:"entry,omitempty"`
	// the min number of provisioned executors
	// optional, 0 means do not provisioned
	MinReplicas int32 `json:"minReplicas,omitempty"`
	// the maximum number of parallel executors
	// optional, 0 means do not scale
	MaxReplicas int32 `json:"maxReplicas,omitempty"`
	// Runtime options for agent and runtime builder
	Runtime *Runtime `json:"runtime"`
	// Meta backport for legacy
	Meta json.RawMessage `json:"meta,omitempty"`
	// Custom any extra or experiments put in here
	Custom json.RawMessage `json:"custom,omitempty"`
}

FuncdefSpec is the specification to describe a Funcdef

func (*FuncdefSpec) DeepCopy

func (in *FuncdefSpec) DeepCopy() *FuncdefSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FuncdefSpec.

func (*FuncdefSpec) DeepCopyInto

func (in *FuncdefSpec) DeepCopyInto(out *FuncdefSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Funcinst

type Funcinst struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`

	Spec   FuncinstSpec   `json:"spec"`
	Status FuncinstStatus `json:"status,omitempty"`
}

Funcinst is a API object to represent a FUNCtion INSTance

func (*Funcinst) AsOwner

func (t *Funcinst) AsOwner() *metav1.OwnerReference

AsOwner returns *metav1.OwnerReference

func (*Funcinst) CryServiceEndpoint

func (t *Funcinst) CryServiceEndpoint() string

CryServiceEndpoint is endpoint to poke a inst to cry

func (*Funcinst) CryingEndpoint

func (t *Funcinst) CryingEndpoint() string

CryingEndpoint is endpoint to signal birth of a inst

func (*Funcinst) DeepCopy

func (in *Funcinst) DeepCopy() *Funcinst

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Funcinst.

func (*Funcinst) DeepCopyInto

func (in *Funcinst) DeepCopyInto(out *Funcinst)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Funcinst) DeepCopyObject

func (in *Funcinst) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Funcinst) EventsPubEndpoint

func (t *Funcinst) EventsPubEndpoint() string

EventsPubEndpoint is endpoint for publishing events

func (*Funcinst) EventsSubEndpoint

func (t *Funcinst) EventsSubEndpoint() string

EventsSubEndpoint is endpoint for subscribing events within same ns

func (*Funcinst) LoggingEndpoint

func (t *Funcinst) LoggingEndpoint() string

LoggingEndpoint is endpoint for logging

func (*Funcinst) Ref

func (t *Funcinst) Ref() *corev1.ObjectReference

Ref returns *corev1.ObjectReference

func (Funcinst) ServiceEndpoint

func (t Funcinst) ServiceEndpoint() string

ServiceEndpoint is endpoint for inst to listen at in order to proivde services

func (*Funcinst) TappingEndpoint

func (t *Funcinst) TappingEndpoint() string

TappingEndpoint is endpoint for tapping

type FuncinstCondition

type FuncinstCondition struct {
	// Type of cluster condition.
	Type FuncinstConditionType `json:"type"`
	// Status of the condition, one of True, False, Unknown.
	Status corev1.ConditionStatus `json:"status"`
	// The last time this condition was updated.
	LastUpdateTime string `json:"lastUpdateTime,omitempty"`
	// Last time the condition transitioned from one status to another.
	LastTransitionTime string `json:"lastTransitionTime,omitempty"`
	// The reason for the condition's last transition.
	Reason string `json:"reason,omitempty"`
	// Human-readable message indicating details about last transition
	Message string `json:"message,omitempty"`
}

FuncinstCondition contains details for the current condition of this funcinst.

func (*FuncinstCondition) DeepCopy

func (in *FuncinstCondition) DeepCopy() *FuncinstCondition

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FuncinstCondition.

func (*FuncinstCondition) DeepCopyInto

func (in *FuncinstCondition) DeepCopyInto(out *FuncinstCondition)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FuncinstConditionType

type FuncinstConditionType string

FuncinstConditionType is label to indicates current state for a func

const (
	FuncinstInactive FuncinstConditionType = "Inactive" // funcinst cannot accept new events
	FuncinstPending  FuncinstConditionType = "Pending"  // waiting for a valid xenv is ready
	FuncinstActive   FuncinstConditionType = "Active"   // can be invoked
)

Different phases during life time of a funcinst

type FuncinstList

type FuncinstList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []Funcinst `json:"items"`
}

FuncinstList is a API object to represent a list of Refuncs

func (*FuncinstList) DeepCopy

func (in *FuncinstList) DeepCopy() *FuncinstList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FuncinstList.

func (*FuncinstList) DeepCopyInto

func (in *FuncinstList) DeepCopyInto(out *FuncinstList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*FuncinstList) DeepCopyObject

func (in *FuncinstList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type FuncinstSpec

type FuncinstSpec struct {
	FuncdefRef *corev1.ObjectReference `json:"funcdefRef,omitempty"`
	TriggerRef *corev1.ObjectReference `json:"triggerRef,omitempty"`

	Runtime RuntimeContext `json:"runtime"`
}

FuncinstSpec is the specification that describes a funcinst for refunc

func (*FuncinstSpec) DeepCopy

func (in *FuncinstSpec) DeepCopy() *FuncinstSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FuncinstSpec.

func (*FuncinstSpec) DeepCopyInto

func (in *FuncinstSpec) DeepCopyInto(out *FuncinstSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FuncinstStatus

type FuncinstStatus struct {
	// Current service state of funcinst.
	Conditions []FuncinstCondition `json:"conditions,omitempty"`
	// number of active instances
	Active int `json:"active,omitempty"`
}

FuncinstStatus is the running status for a refunc

func (*FuncinstStatus) ActiveCondition

func (ts *FuncinstStatus) ActiveCondition() *FuncinstCondition

ActiveCondition gets or creates a active condition

func (*FuncinstStatus) ClearCondition

func (ts *FuncinstStatus) ClearCondition(t FuncinstConditionType) *FuncinstStatus

ClearCondition removes confition of given type from conditions

func (*FuncinstStatus) Deactive

func (ts *FuncinstStatus) Deactive(reason, message string) *FuncinstStatus

Deactive turns active condition(if any) into False, returns *FuncinstStatus for chaining

func (*FuncinstStatus) DeepCopy

func (in *FuncinstStatus) DeepCopy() *FuncinstStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FuncinstStatus.

func (*FuncinstStatus) DeepCopyInto

func (in *FuncinstStatus) DeepCopyInto(out *FuncinstStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*FuncinstStatus) IsActiveCondition

func (ts *FuncinstStatus) IsActiveCondition() bool

IsActiveCondition returns true if current funcinst is marked as active

func (*FuncinstStatus) IsInactiveCondition

func (ts *FuncinstStatus) IsInactiveCondition() bool

IsInactiveCondition returns true if current funcinst is marked as inactive

func (*FuncinstStatus) LastActivity

func (ts *FuncinstStatus) LastActivity() time.Time

LastActivity returns last observed activity time

func (*FuncinstStatus) SetActiveCondition

func (ts *FuncinstStatus) SetActiveCondition(reason, message string) *FuncinstStatus

SetActiveCondition turns this funcinst into active

func (*FuncinstStatus) SetCondition

func (ts *FuncinstStatus) SetCondition(c FuncinstCondition) *FuncinstStatus

SetCondition sets or inserts funcinst condition

func (*FuncinstStatus) SetInactiveCondition

func (ts *FuncinstStatus) SetInactiveCondition(reason, message string) *FuncinstStatus

SetInactiveCondition turns this funcinst into inactive

func (*FuncinstStatus) SetPendingCondition

func (ts *FuncinstStatus) SetPendingCondition(reason, message string) *FuncinstStatus

SetPendingCondition turns this funcinst into pending

func (*FuncinstStatus) Touch

func (ts *FuncinstStatus) Touch() *FuncinstStatus

Touch updates LastUpdateTime of active conidtion

type HTTPTrigger

type HTTPTrigger struct {
	AuthType string          `json:"authType"`
	Cors     HTTPTriggerCors `json:"cors"`
}

HTTPTrigger is a funcinst that will react at HTTP requests https://docs.aws.amazon.com/lambda/latest/dg/lambda-urls.html

func (*HTTPTrigger) DeepCopy

func (in *HTTPTrigger) DeepCopy() *HTTPTrigger

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPTrigger.

func (*HTTPTrigger) DeepCopyInto

func (in *HTTPTrigger) DeepCopyInto(out *HTTPTrigger)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HTTPTriggerCors added in v0.2.1

type HTTPTriggerCors struct {
	AllowCredentials bool     `json:"allowCredentials"`
	AllowHeaders     []string `json:"allowHeaders"`
	AllowMethods     []string `json:"allowMethods"`
	AllowOrigins     []string `json:"allowOrigins"`
	ExposeHeaders    []string `json:"exposeHeaders"`
	MaxAge           int      `json:"maxAge"`
}

func (*HTTPTriggerCors) DeepCopy added in v0.2.1

func (in *HTTPTriggerCors) DeepCopy() *HTTPTriggerCors

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPTriggerCors.

func (*HTTPTriggerCors) DeepCopyInto added in v0.2.1

func (in *HTTPTriggerCors) DeepCopyInto(out *HTTPTriggerCors)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Permissions

type Permissions struct {
	Scope     string   `json:"scope,omitempty"`
	Publish   []string `json:"publish,omitempty"`
	Subscribe []string `json:"subscribe,omitempty"`
}

Permissions provides runtime permissions for funcinst

func NewDefaultPermissions

func NewDefaultPermissions(fni *Funcinst, scopeRoot string) Permissions

NewDefaultPermissions returns default permissions for given inst

func (*Permissions) DeepCopy

func (in *Permissions) DeepCopy() *Permissions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Permissions.

func (*Permissions) DeepCopyInto

func (in *Permissions) DeepCopyInto(out *Permissions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Runtime

type Runtime struct {
	// name of xenv
	Name string `json:"name,omitempty"`

	Envs    map[string]string `json:"envs,omitempty"`
	Timeout int               `json:"timeout,omitempty"`
}

Runtime runtime to operate this template

func (*Runtime) DeepCopy

func (in *Runtime) DeepCopy() *Runtime

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Runtime.

func (*Runtime) DeepCopyInto

func (in *Runtime) DeepCopyInto(out *Runtime)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RuntimeContext

type RuntimeContext struct {
	Credentials Credentials `json:"credentials"`
	Permissions Permissions `json:"permissions"`
}

RuntimeContext is information about runtime shard by pods accross funcinst

func (*RuntimeContext) DeepCopy

func (in *RuntimeContext) DeepCopy() *RuntimeContext

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuntimeContext.

func (*RuntimeContext) DeepCopyInto

func (in *RuntimeContext) DeepCopyInto(out *RuntimeContext)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Trigger

type Trigger struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`

	Spec TriggerSpec `json:"spec"`
}

Trigger is a API object to represent a FUNCtion DEClaration

func (*Trigger) AsOwner

func (t *Trigger) AsOwner() *metav1.OwnerReference

AsOwner returns *metav1.OwnerReference

func (*Trigger) DeepCopy

func (in *Trigger) DeepCopy() *Trigger

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Trigger.

func (*Trigger) DeepCopyInto

func (in *Trigger) DeepCopyInto(out *Trigger)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Trigger) DeepCopyObject

func (in *Trigger) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Trigger) Ref

func (t *Trigger) Ref() *corev1.ObjectReference

Ref returns *corev1.ObjectReference

type TriggerConfig

type TriggerConfig struct {
	Event *EventTrigger `json:"event,omitempty"`
	Cron  *CronTrigger  `json:"cron,omitempty"`
	HTTP  *HTTPTrigger  `json:"http,omitempty"`
}

TriggerConfig is configuraion for a specific trigger

func (*TriggerConfig) DeepCopy

func (in *TriggerConfig) DeepCopy() *TriggerConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TriggerConfig.

func (*TriggerConfig) DeepCopyInto

func (in *TriggerConfig) DeepCopyInto(out *TriggerConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TriggerList

type TriggerList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []Trigger `json:"items"`
}

TriggerList is a API object to represent a list of Refuncs

func (*TriggerList) DeepCopy

func (in *TriggerList) DeepCopy() *TriggerList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TriggerList.

func (*TriggerList) DeepCopyInto

func (in *TriggerList) DeepCopyInto(out *TriggerList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TriggerList) DeepCopyObject

func (in *TriggerList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type TriggerSpec

type TriggerSpec struct {
	FuncName string `json:"funcName"`
	Type     string `json:"type"`

	TriggerConfig `json:",inline"`
}

TriggerSpec is the specification that describes a funcinst for refunc

func (*TriggerSpec) DeepCopy

func (in *TriggerSpec) DeepCopy() *TriggerSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TriggerSpec.

func (*TriggerSpec) DeepCopyInto

func (in *TriggerSpec) DeepCopyInto(out *TriggerSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Xenv

type Xenv struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`

	Spec XenvSpec `json:"spec"`
}

Xenv is a API object to represent a contaniner based eXecution ENVironment for a function

func (*Xenv) AsOwner

func (env *Xenv) AsOwner() *metav1.OwnerReference

AsOwner returns *metav1.OwnerReference

func (*Xenv) DeepCopy

func (in *Xenv) DeepCopy() *Xenv

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Xenv.

func (*Xenv) DeepCopyInto

func (in *Xenv) DeepCopyInto(out *Xenv)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Xenv) DeepCopyObject

func (in *Xenv) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Xenv) Ref

func (env *Xenv) Ref() *corev1.ObjectReference

Ref returns *corev1.ObjectReference

type XenvList

type XenvList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []Xenv `json:"items"`
}

XenvList is a API object to represent a list of Xenv

func (*XenvList) DeepCopy

func (in *XenvList) DeepCopy() *XenvList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new XenvList.

func (*XenvList) DeepCopyInto

func (in *XenvList) DeepCopyInto(out *XenvList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*XenvList) DeepCopyObject

func (in *XenvList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type XenvSpec

type XenvSpec struct {
	// Name of runtime, default is agent mode
	Type string `json:"type,omitempty"`
	// Name of transport, default is agent mode
	Transport string `json:"transport,omitempty"`

	// Container spec https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.10/#container-v1-core
	Container corev1.Container `json:"container"`

	// Secrets to pull image
	ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`

	// Volume sepc // https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.10/#volume-v1-core
	Volumes []corev1.Volume `json:"volumes,omitempty"`

	// Number of pods pre-allocated for(maybe) boosting the speed of a cold start
	PoolSize int `json:"poolSize,omitempty"`

	// ServiceAccount attach to xevn dep
	ServiceAccount string `json:"serviceAccount,omitempty"`

	// A key used for runtime builder to access the shell
	SetupKey string `json:"key"`

	Extra json.RawMessage `json:"extra,omitempty"`
}

XenvSpec is the specification to describe a runner

func (*XenvSpec) DeepCopy

func (in *XenvSpec) DeepCopy() *XenvSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new XenvSpec.

func (*XenvSpec) DeepCopyInto

func (in *XenvSpec) DeepCopyInto(out *XenvSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL