v1

package
Version: v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

+k8s:deepcopy-gen=package +k8s:defaulter-gen=TypeMeta +groupName=fission.io +groupGoName=core

In order not to break the backward compatibility, keep coreV1 types stay at "fission.io" group instead of moving them to "core.fission.io". If the value of group is different from the one we register, the CRD client will not be able to get anything from the API server.

Index

Constants

View Source
const (
	EXECUTOR_INSTANCEID_LABEL string = "executorInstanceId"
	DEFAULT_FUNCTION_TIMEOUT  int    = 60
)
View Source
const (
	BuildStatusPending   = "pending"
	BuildStatusRunning   = "running"
	BuildStatusSucceeded = "succeeded"
	BuildStatusFailed    = "failed"
	BuildStatusNone      = "none"
)
View Source
const (
	AllowedFunctionsPerContainerSingle   = "single"
	AllowedFunctionsPerContainerInfinite = "infinite"
)
View Source
const (
	SharedVolumeUserfunc   = "userfunc"
	SharedVolumePackages   = "packages"
	SharedVolumeSecrets    = "secrets"
	SharedVolumeConfigmaps = "configmaps"
)
View Source
const (
	MessageQueueTypeNats  = "nats-streaming"
	MessageQueueTypeASQ   = "azure-storage-queue"
	MessageQueueTypeKafka = "kafka"
)
View Source
const (
	// FunctionReferenceFunctionName means that the function
	// reference is simply by function name.
	FunctionReferenceTypeFunctionName = "name"

	FunctionReferenceTypeFunctionWeights = "function-weights"
)
View Source
const (
	// failure type currently supported is http status code. This could be extended
	// in the future.
	FailureTypeStatusCode FailureType = "status-code"

	// Status of canary config can be one of the following
	CanaryConfigStatusPending   = "pending"
	CanaryConfigStatusSucceeded = "succeeded"
	CanaryConfigStatusFailed    = "failed"
	CanaryConfigStatusAborted   = "aborted"

	// set a max number for iterations to prevent infinite processing of canary config
	MaxIterationsForCanaryConfig = 10
)
View Source
const (
	FETCH_SOURCE = iota
	FETCH_DEPLOYMENT
	FETCH_URL
)
View Source
const (
	ENVIRONMENT_NAMESPACE     = "environmentNamespace"
	ENVIRONMENT_NAME          = "environmentName"
	ENVIRONMENT_UID           = "environmentUid"
	FUNCTION_NAMESPACE        = "functionNamespace"
	FUNCTION_NAME             = "functionName"
	FUNCTION_UID              = "functionUid"
	FUNCTION_RESOURCE_VERSION = "functionResourceVersion"
	EXECUTOR_TYPE             = "executorType"
)

executor kubernetes object label key

View Source
const (
	BuilderSA = "kubefaas-builder"
	FetcherSA = "kubefaas-fetcher"

	SecretConfigMapGetterCR = "secret-configmap-getter"
	SecretConfigMapGetterRB = "secret-configmap-getter-binding"

	PackageGetterCR = "package-getter"
	PackageGetterRB = "package-getter-binding"

	ClusterRole = "ClusterRole"
)
View Source
const (
	CRD_VERSION          = "fission.io/v1"
	CRD_NAME_ENVIRONMENT = "Environment"
)
View Source
const (
	ErrorUnsupportedType = iota
	ErrorInvalidValue
	ErrorInvalidObject
)
View Source
const (
	ANNOTATION_SVC_HOST = "svcHost"
)
View Source
const (
	ArchiveLiteralSizeLimit int64 = 256 * 1024
)
View Source
const (
	DefaultSpecializationTimeOut = 120
)
View Source
const (
	// ResourceVersionCount env variable is used for updating configmaps and secrets in pods
	ResourceVersionCount string = "RESOURCE_VERSION_COUNT"
)
View Source
const (
	StrategyTypeExecution = "execution"
)

Variables

View Source
var (
	// TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
	// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
	SchemeBuilder runtime.SchemeBuilder

	AddToScheme = localSchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: "fission.io", Version: "v1"}

In order not to break the backward compatibility, keep coreV1 types stay at "fission.io" group instead of moving them to "core.fission.io". If the value of group is different from the one we register, the CRD client will not be able to get anything from the API server.

Functions

func AggregateValidationErrors

func AggregateValidationErrors(objName string, err error) error

func IsValidCronSpec

func IsValidCronSpec(spec string) error

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

func ValidateKubeLabel

func ValidateKubeLabel(field string, labels map[string]string) error

func ValidateKubeName

func ValidateKubeName(field string, val string) error

func ValidateKubePort

func ValidateKubePort(field string, port int) error

func ValidateKubeReference

func ValidateKubeReference(refName string, name string, namespace string) error

Types

type AllowedFunctionsPerContainer

type AllowedFunctionsPerContainer string

type Archive

type Archive struct {
	// Type defines how the package is specified: literal or URL.
	// Available value:
	//  - literal
	//  - url
	Type ArchiveType `json:"type,omitempty"`

	// Literal contents of the package. Can be used for
	// encoding packages below TODO (256KB?) size.
	Literal []byte `json:"literal,omitempty"`

	// URL references a package.
	URL string `json:"url,omitempty"`

	// Checksum ensures the integrity of packages
	// refereced by URL. Ignored for literals.
	Checksum Checksum `json:"checksum,omitempty"`
}

Package contains or references a collection of source or binary files.

func (*Archive) DeepCopy

func (in *Archive) DeepCopy() *Archive

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

func (*Archive) DeepCopyInto

func (in *Archive) DeepCopyInto(out *Archive)

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

func (Archive) IsEmpty

func (a Archive) IsEmpty() bool

func (Archive) Validate

func (archive Archive) Validate() error

type ArchiveType

type ArchiveType string

ArchiveType is either literal or URL, indicating whether the package is specified in the Archive struct or externally.

const (
	// ArchiveTypeLiteral means the package contents are specified in the Literal field of
	// resource itself.
	ArchiveTypeLiteral ArchiveType = "literal"

	// ArchiveTypeUrl means the package contents are at the specified URL.
	ArchiveTypeUrl ArchiveType = "url"
)

type BuildStatus

type BuildStatus string

BuildStatus indicates the current build status of a package.

type Builder

type Builder struct {
	// Image for containing the language compilation environment.
	Image string `json:"image,omitempty"`

	// (Optional) Default build command to run for this build environment.
	Command string `json:"command,omitempty"`

	// (Optional) Container allows the modification of the deployed builder
	// container using the Kubernetes Container spec. Kubefaas overrides
	// the following fields:
	// - Name
	// - Image; set to the Builder.Image
	// - Command; set to the Builder.Command
	// - TerminationMessagePath
	// - ImagePullPolicy
	// - ReadinessProbe
	Container *apiv1.Container `json:"container,omitempty"`

	// PodSpec will store the spec of the pod that will be applied to the pod created for the builder
	PodSpec *apiv1.PodSpec `json:"podspec,omitempty"`
}

Builder is the setting for environment builder.

func (*Builder) DeepCopy

func (in *Builder) DeepCopy() *Builder

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

func (*Builder) DeepCopyInto

func (in *Builder) DeepCopyInto(out *Builder)

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

func (Builder) Validate

func (builder Builder) Validate() error

type CanaryConfig

type CanaryConfig struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	Spec              CanaryConfigSpec   `json:"spec"`
	Status            CanaryConfigStatus `json:"status"`
}

CanaryConfig is for canary deployment of two functions. +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*CanaryConfig) DeepCopy

func (in *CanaryConfig) DeepCopy() *CanaryConfig

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

func (*CanaryConfig) DeepCopyInto

func (in *CanaryConfig) DeepCopyInto(out *CanaryConfig)

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

func (*CanaryConfig) DeepCopyObject

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

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

type CanaryConfigList

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

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

CanaryConfigList is a list of CanaryConfigs. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*CanaryConfigList) DeepCopy

func (in *CanaryConfigList) DeepCopy() *CanaryConfigList

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

func (*CanaryConfigList) DeepCopyInto

func (in *CanaryConfigList) DeepCopyInto(out *CanaryConfigList)

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

func (*CanaryConfigList) DeepCopyObject

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

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

type CanaryConfigSpec

type CanaryConfigSpec struct {
	// HTTP trigger that this config references
	Trigger string `json:"trigger"`

	// New version of the function
	NewFunction string `json:"newfunction"`

	// Old stable version of the function
	OldFunction string `json:"oldfunction"`

	// Weight increment step for function
	WeightIncrement int `json:"weightincrement"`

	// Weight increment interval, string representation of time.Duration, ex : 1m, 2h, 2d (default: "2m")
	WeightIncrementDuration string `json:"duration"`

	// Threshold in percentage beyond which the new version of the function is considered unstable
	FailureThreshold int         `json:"failurethreshold"`
	FailureType      FailureType `json:"failureType"`
}

Canary Config Spec

func (*CanaryConfigSpec) DeepCopy

func (in *CanaryConfigSpec) DeepCopy() *CanaryConfigSpec

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

func (*CanaryConfigSpec) DeepCopyInto

func (in *CanaryConfigSpec) DeepCopyInto(out *CanaryConfigSpec)

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

type CanaryConfigStatus

type CanaryConfigStatus struct {
	Status string `json:"status"`
}

CanaryConfig Status

func (*CanaryConfigStatus) DeepCopy

func (in *CanaryConfigStatus) DeepCopy() *CanaryConfigStatus

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

func (*CanaryConfigStatus) DeepCopyInto

func (in *CanaryConfigStatus) DeepCopyInto(out *CanaryConfigStatus)

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

type Checksum

type Checksum struct {
	Type ChecksumType `json:"type,omitempty"`
	Sum  string       `json:"sum,omitempty"`
}

Checksum of package contents when the contents are stored outside the Package struct. Type is the checksum algorithm; "sha256" is the only currently supported one. Sum is hex encoded.

func (*Checksum) DeepCopy

func (in *Checksum) DeepCopy() *Checksum

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

func (*Checksum) DeepCopyInto

func (in *Checksum) DeepCopyInto(out *Checksum)

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

func (Checksum) Validate

func (checksum Checksum) Validate() error

type ChecksumType

type ChecksumType string

ChecksumType specifies the checksum algorithm, such as sha256, used for a checksum.

const (
	ChecksumTypeSHA256 ChecksumType = "sha256"
)

type ConfigMapReference

type ConfigMapReference struct {
	Namespace string `json:"namespace"`
	Name      string `json:"name"`
}

ConfigMapReference is a reference to a kubernetes configmap.

func (*ConfigMapReference) DeepCopy

func (in *ConfigMapReference) DeepCopy() *ConfigMapReference

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

func (*ConfigMapReference) DeepCopyInto

func (in *ConfigMapReference) DeepCopyInto(out *ConfigMapReference)

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

func (ConfigMapReference) Validate

func (ref ConfigMapReference) Validate() error

type Environment

type Environment struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	Spec              EnvironmentSpec `json:"spec"`
}

Environment is environment for building and running user functions. +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*Environment) DeepCopy

func (in *Environment) DeepCopy() *Environment

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

func (*Environment) DeepCopyInto

func (in *Environment) DeepCopyInto(out *Environment)

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

func (*Environment) DeepCopyObject

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

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

func (*Environment) Validate

func (e *Environment) Validate() error

type EnvironmentList

type EnvironmentList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []Environment `json:"items"`
}

EnvironmentList is a list of Environments. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*EnvironmentList) DeepCopy

func (in *EnvironmentList) DeepCopy() *EnvironmentList

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

func (*EnvironmentList) DeepCopyInto

func (in *EnvironmentList) DeepCopyInto(out *EnvironmentList)

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

func (*EnvironmentList) DeepCopyObject

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

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

func (*EnvironmentList) Validate

func (el *EnvironmentList) Validate() error

type EnvironmentReference

type EnvironmentReference struct {
	Namespace string `json:"namespace"`
	Name      string `json:"name"`
}

EnvironmentReference is a reference to a environment.

func (*EnvironmentReference) DeepCopy

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

func (*EnvironmentReference) DeepCopyInto

func (in *EnvironmentReference) DeepCopyInto(out *EnvironmentReference)

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

func (EnvironmentReference) Validate

func (ref EnvironmentReference) Validate() error

type EnvironmentSpec

type EnvironmentSpec struct {
	// Version is the Environment API version
	//
	// Version "1" allows user to run code snippet in a file and
	// it's supported by most of environments except tensorflow-serving.
	//
	// Version "2" supports downloading and compiling user function if source archive is not empty.
	//
	// Version "3" is almost the same with v2, but you're able to control the size of pre-warm pool of the environment.
	Version int `json:"version"`

	// Runtime is configuration for running function, like container image etc.
	Runtime Runtime `json:"runtime"`

	// (Optional) Builder is configuration for builder manager to launch environment builder to build source code into
	// deployable binary.
	Builder Builder `json:"builder"`

	// NOT USED NOW.
	// (Optional) Strongly encouraged. Used to populate links from UI, CLI, etc.
	DocumentationURL string `json:"-"` // `json:"documentationurl,omitempty"`

	// (Optional) defaults to 'single'. Kubefaas workflow uses
	// 'infinite' to load multiple functions in one function pod.
	// Available value:
	// - single
	// - infinite
	AllowedFunctionsPerContainer AllowedFunctionsPerContainer `json:"allowedFunctionsPerContainer,omitempty"`

	// Istio default blocks all egress traffic for safety.
	// To enable accessibility of external network for builder/function pod, set to 'true'.
	// (Optional) defaults to 'false'
	AllowAccessToExternalNetwork bool `json:"allowAccessToExternalNetwork,omitempty"`

	// The request and limit CPU/MEM resource setting for poolmanager to set up pods in the pre-warm pool.
	// (Optional) defaults to no limitation.
	Resources apiv1.ResourceRequirements `json:"resources"`

	// The initial pool size for environment
	Poolsize int `json:"poolsize,omitempty"`

	// The grace time for pod to perform connection draining before termination. The unit is in seconds.
	// (Optional) defaults to 360 seconds
	TerminationGracePeriod int64 `json:"terminationGracePeriod,omitempty"`

	// KeepArchive is used by fetcher to determine if the extracted archive
	// or unarchived file should be placed, which is then used by specialize handler.
	// (This is mainly for the JVM environment because .jar is one kind of zip archive.)
	KeepArchive bool `json:"keeparchive"`

	// ImagePullSecret is the secret for Kubernetes to pull an image from a
	// private registry.
	ImagePullSecret string `json:"imagepullsecret"`
}

EnvironmentSpec contains with builder, runtime and some other related environment settings.

func (*EnvironmentSpec) DeepCopy

func (in *EnvironmentSpec) DeepCopy() *EnvironmentSpec

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

func (*EnvironmentSpec) DeepCopyInto

func (in *EnvironmentSpec) DeepCopyInto(out *EnvironmentSpec)

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

func (EnvironmentSpec) Validate

func (spec EnvironmentSpec) Validate() error

type ExecutionStrategy

type ExecutionStrategy struct {

	// ExecutorType is the executor type of a function used. Defaults to "poolmgr".
	//
	// Available value:
	//  - poolmgr
	//  - newdeploy
	ExecutorType ExecutorType

	// This is only for newdeploy to set up minimum replicas of deployment.
	MinScale int

	// This is only for newdeploy to set up maximum replicas of deployment.
	MaxScale int

	// This is only for newdeploy to set up target CPU utilization of HPA.
	TargetCPUPercent int

	// This is the timeout setting for executor to wait for pod specialization.
	SpecializationTimeout int
}

ExecutionStrategy specifies low-level parameters for function execution, such as the number of instances.

MinScale affects the cold start behaviour for a function. If MinScale is 0 then the deployment is created on first invocation of function and is good for requests of asynchronous nature. If MinScale is greater than 0 then MinScale number of pods are created at the time of creation of function. This ensures faster response during first invocation at the cost of consuming resources.

MaxScale is the maximum number of pods that function will scale to based on TargetCPUPercent and resources allocated to the function pod.

func (*ExecutionStrategy) DeepCopy

func (in *ExecutionStrategy) DeepCopy() *ExecutionStrategy

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

func (*ExecutionStrategy) DeepCopyInto

func (in *ExecutionStrategy) DeepCopyInto(out *ExecutionStrategy)

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

func (ExecutionStrategy) Validate

func (es ExecutionStrategy) Validate() error

type ExecutorType

type ExecutorType string

ExecutorType is the primary executor for an environment

const (
	ExecutorTypePoolmgr   ExecutorType = "poolmgr"
	ExecutorTypeNewdeploy ExecutorType = "newdeploy"
)

type FailureType

type FailureType string

type Function

type Function struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	Spec              FunctionSpec `json:"spec"`
}

Function is function runs within environment runtime with given package and secrets/configmaps. +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*Function) DeepCopy

func (in *Function) DeepCopy() *Function

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

func (*Function) DeepCopyInto

func (in *Function) DeepCopyInto(out *Function)

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

func (*Function) DeepCopyObject

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

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

func (*Function) Validate

func (f *Function) Validate() error

type FunctionList

type FunctionList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []Function `json:"items"`
}

FunctionList is a list of Functions. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*FunctionList) DeepCopy

func (in *FunctionList) DeepCopy() *FunctionList

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

func (*FunctionList) DeepCopyInto

func (in *FunctionList) DeepCopyInto(out *FunctionList)

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

func (*FunctionList) DeepCopyObject

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

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

func (*FunctionList) Validate

func (fl *FunctionList) Validate() error

type FunctionPackageRef

type FunctionPackageRef struct {
	// Package reference
	PackageRef PackageRef `json:"packageref"`

	// FunctionName specifies a specific function within the package. This allows
	// functions to share packages, by having different functions within the same
	// package.
	//
	// Kubefaas itself does not interpret this path. It is passed verbatim to
	// build and runtime environments.
	//
	// This is optional: if unspecified, the environment has a default name.
	FunctionName string `json:"functionName,omitempty"`
}

FunctionPackageRef includes the reference to the package also the entrypoint of package.

func (*FunctionPackageRef) DeepCopy

func (in *FunctionPackageRef) DeepCopy() *FunctionPackageRef

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

func (*FunctionPackageRef) DeepCopyInto

func (in *FunctionPackageRef) DeepCopyInto(out *FunctionPackageRef)

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

func (FunctionPackageRef) Validate

func (ref FunctionPackageRef) Validate() error

type FunctionReference

type FunctionReference struct {
	// Type indicates whether this function reference is by name or selector. For now,
	// the only supported reference type is by "name".  Future reference types:
	//   * Function by label or annotation
	//   * Branch or tag of a versioned function
	//   * A "rolling upgrade" from one version of a function to another
	// Available value:
	// - name
	// - function-weights
	Type FunctionReferenceType `json:"type"`

	// Name of the function.
	Name string `json:"name"`

	// Function Reference by weight. this map contains function name as key and its weight
	// as the value. This is for canary upgrade purpose.
	FunctionWeights map[string]int `json:"functionweights"`
}

func (*FunctionReference) DeepCopy

func (in *FunctionReference) DeepCopy() *FunctionReference

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

func (*FunctionReference) DeepCopyInto

func (in *FunctionReference) DeepCopyInto(out *FunctionReference)

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

func (FunctionReference) Validate

func (ref FunctionReference) Validate() error

type FunctionReferenceType

type FunctionReferenceType string

type FunctionSpec

type FunctionSpec struct {
	// Environment is the build and runtime environment that this function is
	// associated with. An Environment with this name should exist, otherwise the
	// function cannot be invoked.
	Environment EnvironmentReference `json:"environment"`

	// Reference to a package containing deployment and optionally the source.
	Package FunctionPackageRef `json:"package"`

	// Reference to a list of secrets.
	Secrets []SecretReference `json:"secrets"`

	// Reference to a list of configmaps.
	ConfigMaps []ConfigMapReference `json:"configmaps"`

	// cpu and memory resources as per K8S standards
	// This is only for newdeploy to set up resource limitation
	// when creating deployment for a function.
	Resources apiv1.ResourceRequirements `json:"resources"`

	// InvokeStrategy is a set of controls which affect how function executes
	InvokeStrategy InvokeStrategy

	// FunctionTimeout provides a maximum amount of duration within which a request for
	// a particular function execution should be complete.
	// This is optional. If not specified default value will be taken as 60s
	FunctionTimeout int `json:"functionTimeout,omitempty"`

	// IdleTimeout specifies the length of time that a function is idle before the
	// function pod(s) are eligible for deletion. If no traffic to the function
	// is detected within the idle timeout, the executor will then recycle the
	// function pod(s) to release resources.
	IdleTimeout *int `json:"idletimeout,omitempty"`
}

FunctionSpec describes the contents of the function.

func (*FunctionSpec) DeepCopy

func (in *FunctionSpec) DeepCopy() *FunctionSpec

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

func (*FunctionSpec) DeepCopyInto

func (in *FunctionSpec) DeepCopyInto(out *FunctionSpec)

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

func (FunctionSpec) Validate

func (spec FunctionSpec) Validate() error

type HTTPTrigger

type HTTPTrigger struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	Spec              HTTPTriggerSpec `json:"spec"`
}

HTTPTrigger is the trigger invokes user functions when receiving HTTP requests. +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

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.

func (*HTTPTrigger) DeepCopyObject

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

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

func (*HTTPTrigger) Validate

func (h *HTTPTrigger) Validate() error

type HTTPTriggerList

type HTTPTriggerList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []HTTPTrigger `json:"items"`
}

HTTPTriggerList is a list of HTTPTriggers +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*HTTPTriggerList) DeepCopy

func (in *HTTPTriggerList) DeepCopy() *HTTPTriggerList

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

func (*HTTPTriggerList) DeepCopyInto

func (in *HTTPTriggerList) DeepCopyInto(out *HTTPTriggerList)

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

func (*HTTPTriggerList) DeepCopyObject

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

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

func (*HTTPTriggerList) Validate

func (hl *HTTPTriggerList) Validate() error

type HTTPTriggerSpec

type HTTPTriggerSpec struct {
	// TODO: remove this field since we have IngressConfig already
	// Deprecated: the original idea of this field is not for setting Ingress.
	// Since we have IngressConfig now, remove Host after couple releases.
	Host string `json:"host"`

	// RelativeURL is the exposed URL for external client to access a function with.
	RelativeURL string `json:"relativeurl"`

	// HTTP method to access a function.
	Method string `json:"method"`

	// FunctionReference is a reference to the target function.
	FunctionReference FunctionReference `json:"functionref"`

	// If CreateIngress is true, router will create a ingress definition.
	CreateIngress bool `json:"createingress"`

	// TODO: make IngressConfig a independent resource
	// IngressConfig for router to set up Ingress.
	IngressConfig IngressConfig `json:"ingressconfig"`
}

HTTPTriggerSpec is for router to expose user functions at the given URL path.

func (*HTTPTriggerSpec) DeepCopy

func (in *HTTPTriggerSpec) DeepCopy() *HTTPTriggerSpec

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

func (*HTTPTriggerSpec) DeepCopyInto

func (in *HTTPTriggerSpec) DeepCopyInto(out *HTTPTriggerSpec)

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

func (HTTPTriggerSpec) Validate

func (spec HTTPTriggerSpec) Validate() error

type IngressConfig

type IngressConfig struct {
	// Annotations will be add to metadata when creating Ingress.
	Annotations map[string]string `json:"annotations"`

	// Path is for path matching. The format of path
	// depends on what ingress controller you used.
	Path string `json:"path"`

	// Host is for ingress controller to apply rules. If
	// host is empty or "*", the rule applies to all
	// inbound HTTP traffic.
	Host string `json:"host"`

	// TLS is for user to specify a Secret that contains
	// TLS key and certificate. The domain name in the
	// key and crt must match the value of Host field.
	TLS string `json:"tls"`
}

IngressConfig is for router to set up Ingress.

func (*IngressConfig) DeepCopy

func (in *IngressConfig) DeepCopy() *IngressConfig

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

func (*IngressConfig) DeepCopyInto

func (in *IngressConfig) DeepCopyInto(out *IngressConfig)

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

func (IngressConfig) Validate

func (config IngressConfig) Validate() error

type InvokeStrategy

type InvokeStrategy struct {

	// ExecutionStrategy specifies low-level parameters for function execution,
	// such as the number of instances.
	ExecutionStrategy ExecutionStrategy

	// StrategyType is the strategy type of a function.
	// Now it only supports 'execution'.
	StrategyType StrategyType
}

InvokeStrategy is a set of controls over how the function executes. It affects the performance and resource usage of the function.

An InvokeStrategy is of one of two types: ExecutionStrategy, which controls low-level parameters such as which ExecutorType to use, when to autoscale, minimum and maximum number of running instances, etc. A higher-level AbstractInvokeStrategy will also be supported; this strategy would specify the target request rate of the function, the target latency statistics, and the target cost (in terms of compute resources).

func (*InvokeStrategy) DeepCopy

func (in *InvokeStrategy) DeepCopy() *InvokeStrategy

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

func (*InvokeStrategy) DeepCopyInto

func (in *InvokeStrategy) DeepCopyInto(out *InvokeStrategy)

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

func (InvokeStrategy) Validate

func (is InvokeStrategy) Validate() error

type KubernetesWatchTrigger

type KubernetesWatchTrigger struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	Spec              KubernetesWatchTriggerSpec `json:"spec"`
}

KubernetesWatchTrigger watches kubernetes resource events and invokes functions. +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*KubernetesWatchTrigger) DeepCopy

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

func (*KubernetesWatchTrigger) DeepCopyInto

func (in *KubernetesWatchTrigger) DeepCopyInto(out *KubernetesWatchTrigger)

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

func (*KubernetesWatchTrigger) DeepCopyObject

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

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

func (*KubernetesWatchTrigger) Validate

func (k *KubernetesWatchTrigger) Validate() error

type KubernetesWatchTriggerList

type KubernetesWatchTriggerList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []KubernetesWatchTrigger `json:"items"`
}

KubernetesWatchTriggerList is a list of KubernetesWatchTriggers +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*KubernetesWatchTriggerList) DeepCopy

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

func (*KubernetesWatchTriggerList) DeepCopyInto

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

func (*KubernetesWatchTriggerList) DeepCopyObject

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

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

func (*KubernetesWatchTriggerList) Validate

func (kl *KubernetesWatchTriggerList) Validate() error

type KubernetesWatchTriggerSpec

type KubernetesWatchTriggerSpec struct {
	Namespace string `json:"namespace"`

	// Type of resource to watch (Pod, Service, etc.)
	Type string `json:"type"`

	// Resource labels
	LabelSelector map[string]string `json:"labelselector"`

	// The reference to a function for kubewatcher to invoke with
	// when receiving events.
	FunctionReference FunctionReference `json:"functionref"`
}

KubernetesWatchTriggerSpec

func (*KubernetesWatchTriggerSpec) DeepCopy

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

func (*KubernetesWatchTriggerSpec) DeepCopyInto

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

func (KubernetesWatchTriggerSpec) Validate

func (spec KubernetesWatchTriggerSpec) Validate() error

type MessageQueueTrigger

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

	Spec MessageQueueTriggerSpec `json:"spec"`
}

MessageQueueTrigger invokes functions when messages arrive to certain topic that trigger subscribes to. +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*MessageQueueTrigger) DeepCopy

func (in *MessageQueueTrigger) DeepCopy() *MessageQueueTrigger

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

func (*MessageQueueTrigger) DeepCopyInto

func (in *MessageQueueTrigger) DeepCopyInto(out *MessageQueueTrigger)

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

func (*MessageQueueTrigger) DeepCopyObject

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

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

func (*MessageQueueTrigger) Validate

func (m *MessageQueueTrigger) Validate() error

type MessageQueueTriggerList

type MessageQueueTriggerList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []MessageQueueTrigger `json:"items"`
}

MessageQueueTriggerList is a list of MessageQueueTriggers. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*MessageQueueTriggerList) DeepCopy

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

func (*MessageQueueTriggerList) DeepCopyInto

func (in *MessageQueueTriggerList) DeepCopyInto(out *MessageQueueTriggerList)

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

func (*MessageQueueTriggerList) DeepCopyObject

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

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

func (*MessageQueueTriggerList) Validate

func (ml *MessageQueueTriggerList) Validate() error

type MessageQueueTriggerSpec

type MessageQueueTriggerSpec struct {
	// The reference to a function for message queue trigger to invoke with
	// when receiving messages from subscribed topic.
	FunctionReference FunctionReference `json:"functionref"`

	// Type of message queue (NATS, Kafka, AzureQueue)
	MessageQueueType MessageQueueType `json:"messageQueueType"`

	// Subscribed topic
	Topic string `json:"topic"`

	// Topic for message queue trigger to sent response from function.
	ResponseTopic string `json:"respTopic,omitempty"`

	// Topic to collect error response sent from function
	ErrorTopic string `json:"errorTopic"`

	// Maximum times for message queue trigger to retry
	MaxRetries int `json:"maxRetries"`

	// Content type of payload
	ContentType string `json:"contentType"`
}

MessageQueueTriggerSpec defines a binding from a topic in a message queue to a function.

func (*MessageQueueTriggerSpec) DeepCopy

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

func (*MessageQueueTriggerSpec) DeepCopyInto

func (in *MessageQueueTriggerSpec) DeepCopyInto(out *MessageQueueTriggerSpec)

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

func (MessageQueueTriggerSpec) Validate

func (spec MessageQueueTriggerSpec) Validate() error

type MessageQueueType

type MessageQueueType string

Type of message queue

type MetadataAccessor

type MetadataAccessor interface {
	GetObjectKind() schema.ObjectKind
	GetObjectMeta() metav1.Object
}

MetadataAccessor lets you work with object metadata and type metadata from any of the versioned or internal API objects.

type Package

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

	Spec PackageSpec `json:"spec"`

	// Status indicates the build status of package.
	Status PackageStatus `json:"status"`
}

Packages. Think of these as function-level images. +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*Package) DeepCopy

func (in *Package) DeepCopy() *Package

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

func (*Package) DeepCopyInto

func (in *Package) DeepCopyInto(out *Package)

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

func (*Package) DeepCopyObject

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

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

func (*Package) Validate

func (p *Package) Validate() error

type PackageList

type PackageList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []Package `json:"items"`
}

PackageList is a list of Packages. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*PackageList) DeepCopy

func (in *PackageList) DeepCopy() *PackageList

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

func (*PackageList) DeepCopyInto

func (in *PackageList) DeepCopyInto(out *PackageList)

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

func (*PackageList) DeepCopyObject

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

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

func (*PackageList) Validate

func (pl *PackageList) Validate() error

type PackageRef

type PackageRef struct {
	Namespace string `json:"namespace"`
	Name      string `json:"name"`

	// Including resource version in the reference forces the function to be updated on
	// package update, making it possible to cache the function based on its metadata.
	ResourceVersion string `json:"resourceversion,omitempty"`
}

PackageRef is a reference to the package.

func (*PackageRef) DeepCopy

func (in *PackageRef) DeepCopy() *PackageRef

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

func (*PackageRef) DeepCopyInto

func (in *PackageRef) DeepCopyInto(out *PackageRef)

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

func (PackageRef) Validate

func (ref PackageRef) Validate() error

type PackageSpec

type PackageSpec struct {
	// Environment is a reference to the environment for building source archive.
	Environment EnvironmentReference `json:"environment"`

	// Source is the archive contains source code and dependencies file.
	// If the package status is in PENDING state, builder manager will then
	// notify builder to compile source and save the result as deployable archive.
	Source Archive `json:"source,omitempty"`

	// Deployment is the deployable archive that environment runtime used to run user function.
	Deployment Archive `json:"deployment,omitempty"`

	// BuildCommand is a custom build command that builder used to build the source archive.
	BuildCommand string `json:"buildcmd,omitempty"`
}

PackageSpec includes source/deploy archives and the reference of environment to build the package.

func (*PackageSpec) DeepCopy

func (in *PackageSpec) DeepCopy() *PackageSpec

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

func (*PackageSpec) DeepCopyInto

func (in *PackageSpec) DeepCopyInto(out *PackageSpec)

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

func (PackageSpec) Validate

func (spec PackageSpec) Validate() error

type PackageStatus

type PackageStatus struct {

	// BuildStatus is the package build status.
	BuildStatus BuildStatus `json:"buildstatus,omitempty"`

	// BuildLog stores build log during the compilation.
	BuildLog string `json:"buildlog,omitempty"` // output of the build (errors etc)

	// LastUpdateTimestamp will store the timestamp the package was last updated
	// metav1.Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON.
	// https://github.com/kubernetes/apimachinery/blob/44bd77c24ef93cd3a5eb6fef64e514025d10d44e/pkg/apis/meta/v1/time.go#L26-L35
	LastUpdateTimestamp metav1.Time `json:"lastUpdateTimestamp,omitempty"`
}

PackageStatus contains the build status of a package also the build log for examination.

func (*PackageStatus) DeepCopy

func (in *PackageStatus) DeepCopy() *PackageStatus

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

func (*PackageStatus) DeepCopyInto

func (in *PackageStatus) DeepCopyInto(out *PackageStatus)

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

func (PackageStatus) Validate

func (sts PackageStatus) Validate() error

type Runtime

type Runtime struct {
	// Image for containing the language runtime.
	Image string `json:"image"`

	// NOT USED NOW
	// LoadEndpointPort defines the port on which the
	// server listens for function load
	// requests. Optional; default 8888.
	LoadEndpointPort int32 `json:"-"` // `json:"loadendpointport"`

	// NOT USED NOW
	// LoadEndpointPath defines the relative URL on which
	// the server listens for function load
	// requests. Optional; default "/specialize".
	LoadEndpointPath string `json:"-"` // `json:"loadendpointpath"`

	// NOT USED NOW
	// FunctionEndpointPort defines the port on which the
	// server listens for function requests. Optional;
	// default 8888.
	FunctionEndpointPort int32 `json:"-"` // `json:"functionendpointport"`

	// (Optional) Container allows the modification of the deployed runtime
	// container using the Kubernetes Container spec. Kubefaas overrides
	// the following fields:
	// - Name
	// - Image; set to the Runtime.Image
	// - TerminationMessagePath
	// - ImagePullPolicy
	//
	// You can set either PodSpec or Container, but not both.
	Container *apiv1.Container `json:"container,omitempty"`

	// (Optional) Podspec allows modification of deployed runtime pod with Kubernetes PodSpec
	// The merging logic is briefly described below and detailed MergePodSpec function
	// - Volumes mounts and env variables for function and fetcher container are appended
	// - All additional containers and init containers are appended
	// - Volume definitions are appended
	// - Lists such as tolerations, ImagePullSecrets, HostAliases are appended
	// - Structs are merged and variables from pod spec take precedence
	//
	// You can set either PodSpec or Container, but not both.
	PodSpec *apiv1.PodSpec `json:"podspec,omitempty"`
}

Runtime is the setting for environment runtime.

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.

func (Runtime) Validate

func (runtime Runtime) Validate() error

type SecretReference

type SecretReference struct {
	Namespace string `json:"namespace"`
	Name      string `json:"name"`
}

SecretReference is a reference to a kubernetes secret.

func (*SecretReference) DeepCopy

func (in *SecretReference) DeepCopy() *SecretReference

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

func (*SecretReference) DeepCopyInto

func (in *SecretReference) DeepCopyInto(out *SecretReference)

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

func (SecretReference) Validate

func (ref SecretReference) Validate() error

type StrategyType

type StrategyType string

StrategyType is the strategy to be used for function execution

type TimeTrigger

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

	Spec TimeTriggerSpec `json:"spec"`
}

TimeTrigger invokes functions based on given cron schedule. +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*TimeTrigger) DeepCopy

func (in *TimeTrigger) DeepCopy() *TimeTrigger

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

func (*TimeTrigger) DeepCopyInto

func (in *TimeTrigger) DeepCopyInto(out *TimeTrigger)

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

func (*TimeTrigger) DeepCopyObject

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

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

func (*TimeTrigger) Validate

func (t *TimeTrigger) Validate() error

type TimeTriggerList

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

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

TimeTriggerList is a list of TimeTriggers. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*TimeTriggerList) DeepCopy

func (in *TimeTriggerList) DeepCopy() *TimeTriggerList

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

func (*TimeTriggerList) DeepCopyInto

func (in *TimeTriggerList) DeepCopyInto(out *TimeTriggerList)

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

func (*TimeTriggerList) DeepCopyObject

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

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

func (*TimeTriggerList) Validate

func (tl *TimeTriggerList) Validate() error

type TimeTriggerSpec

type TimeTriggerSpec struct {
	// Cron schedule
	Cron string `json:"cron"`

	// The reference to function
	FunctionReference `json:"functionref"`
}

TimeTrigger invokes the specific function at a time or times specified by a cron string.

func (*TimeTriggerSpec) DeepCopy

func (in *TimeTriggerSpec) DeepCopy() *TimeTriggerSpec

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

func (*TimeTriggerSpec) DeepCopyInto

func (in *TimeTriggerSpec) DeepCopyInto(out *TimeTriggerSpec)

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

func (TimeTriggerSpec) Validate

func (spec TimeTriggerSpec) Validate() error

type ValidationError

type ValidationError struct {
	// Type of validation error.
	// It indicates what kind of error of field in error output.
	Type ValidationErrorType

	// Name of error field.
	// Example: FunctionReference.Name
	Field string

	// Error field value.
	BadValue string

	// Detail error message
	Detail string
}

ValidationError is a custom error type for resource validation. It indicate which field is invalid or illegal in the kubefaas resource. Also, it shows what kind of error type, bad value and detail error messages.

func MakeValidationErr

func MakeValidationErr(errType ValidationErrorType, field string, val interface{}, detail ...string) ValidationError

func (*ValidationError) DeepCopy

func (in *ValidationError) DeepCopy() *ValidationError

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

func (*ValidationError) DeepCopyInto

func (in *ValidationError) DeepCopyInto(out *ValidationError)

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

func (ValidationError) Error

func (e ValidationError) Error() string

type ValidationErrorType

type ValidationErrorType int

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL