Documentation
¶
Index ¶
- func GetIngressesFromTriggers(triggers map[string]Trigger) map[string]Ingress
- func GetTriggersByKind(triggers map[string]Trigger, kind string) map[string]Trigger
- func ParseHandler(handler string) (string, string, error)
- type Build
- type BuildMode
- type Checkpoint
- type Config
- type ConfigWithStatus
- type DataBinding
- type Directive
- type FunctionState
- type Ingress
- type LoggerSink
- type Meta
- type Partition
- type Platform
- type Reader
- type Spec
- type Status
- type Trigger
- type Volume
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetIngressesFromTriggers ¶
GetIngressesFromTriggers returns all ingresses from a map of triggers
func GetTriggersByKind ¶
GetTriggersByKind returns a map of triggers by their kind
Types ¶
type Build ¶
type Build struct {
Path string `json:"path,omitempty"`
FunctionSourceCode string `json:"functionSourceCode,omitempty"`
FunctionConfigPath string `json:"functionConfigPath,omitempty"`
TempDir string `json:"tempDir,omitempty"`
Registry string `json:"registry,omitempty"`
Image string `json:"image,omitempty"`
NoBaseImagesPull bool `json:"noBaseImagesPull,omitempty"`
NoCache bool `json:"noCache,omitempty"`
NoCleanup bool `json:"noCleanup,omitempty"`
BaseImage string `json:"baseImage,omitempty"`
Commands []string `json:"commands,omitempty"`
Directives map[string][]Directive `json:"directives,omitempty"`
ScriptPaths []string `json:"scriptPaths,omitempty"`
AddedObjectPaths map[string]string `json:"addedPaths,omitempty"`
Dependencies []string `json:"dependencies,omitempty"`
OnbuildImage string `json:"onbuildImage,omitempty"`
Offline bool `json:"offline,omitempty"`
RuntimeAttributes map[string]interface{} `json:"runtimeAttributes,omitempty"`
CodeEntryType string `json:"codeEntryType,omitempty"`
CodeEntryAttributes map[string]interface{} `json:"codeEntryAttributes,omitempty"`
Timestamp int64 `json:"timestamp,omitempty"`
Mode BuildMode `json:"mode,omitempty"`
}
Build holds all configuration parameters related to building a function
type ConfigWithStatus ¶
ConfigWithStatus holds the config and status of a function
type DataBinding ¶
type DataBinding struct {
Name string `json:"name,omitempty"`
Class string `json:"class"`
Kind string `json:"kind"`
URL string `json:"url"`
Path string `json:"path,omitempty"`
Query string `json:"query,omitempty"`
Secret string `json:"secret,omitempty"`
Attributes map[string]interface{} `json:"attributes,omitempty"`
}
DataBinding holds configuration for a databinding
type FunctionState ¶
type FunctionState string
const ( FunctionStateWaitingForBuild FunctionState = "waitingForBuild" FunctionStateBuilding FunctionState = "building" FunctionStateWaitingForResourceConfiguration FunctionState = "waitingForResourceConfiguration" FunctionStateConfiguringResources FunctionState = "configuringResources" FunctionStateReady FunctionState = "ready" FunctionStateError FunctionState = "error" )
type Ingress ¶
Ingress holds configuration for an ingress - an entity that can route HTTP requests to the function
type LoggerSink ¶
type LoggerSink struct {
Level string `json:"level,omitempty"`
Sink string `json:"sink,omitempty"`
}
LoggerSink overrides the default platform configuration for function loggers
type Meta ¶
type Meta struct {
Name string `json:"name,omitempty"`
Namespace string `json:"namespace,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
Annotations map[string]string `json:"annotations,omitempty"`
}
Meta identifies a function
func (*Meta) GetUniqueID ¶
type Partition ¶
type Partition struct {
ID string `json:"id"`
Checkpoint Checkpoint `json:"checkpoint,omitempty"`
}
Partition is a partition information
type Platform ¶
type Platform struct {
Attributes map[string]interface{} `json:"attributes,omitempty"`
}
Platform holds platform specific attributes
type Spec ¶
type Spec struct {
Description string `json:"description,omitempty"`
Disabled bool `json:"disable,omitempty"`
Publish bool `json:"publish,omitempty"`
Handler string `json:"handler,omitempty"`
Runtime string `json:"runtime,omitempty"`
Env []v1.EnvVar `json:"env,omitempty"`
Resources v1.ResourceRequirements `json:"resources,omitempty"`
Image string `json:"image,omitempty"`
ImageHash string `json:"imageHash,omitempty"`
Replicas int `json:"replicas,omitempty"`
MinReplicas int `json:"minReplicas,omitempty"`
MaxReplicas int `json:"maxReplicas,omitempty"`
TargetCPU int `json:"targetCPU,omitempty"`
DataBindings map[string]DataBinding `json:"dataBindings,omitempty"`
Triggers map[string]Trigger `json:"triggers,omitempty"`
Volumes []Volume `json:"volumes,omitempty"`
Version int `json:"version,omitempty"`
Alias string `json:"alias,omitempty"`
Build Build `json:"build,omitempty"`
RunRegistry string `json:"runRegistry,omitempty"`
RuntimeAttributes map[string]interface{} `json:"runtimeAttributes,omitempty"`
LoggerSinks []LoggerSink `json:"loggerSinks,omitempty"`
DealerURI string `json:"dealerURI,omitempty"`
Platform Platform `json:"platform,omitempty"`
ReadinessTimeoutSeconds int `json:"readinessTimeoutSeconds,omitempty"`
Avatar string `json:"avatar,omitempty"`
}
Spec holds all parameters related to a function's configuration
func (*Spec) GetHTTPPort ¶
func (*Spec) GetRuntimeNameAndVersion ¶
type Status ¶
type Status struct {
State FunctionState `json:"state,omitempty"`
Message string `json:"message,omitempty"`
Logs []map[string]interface{} `json:"logs,omitempty"`
HTTPPort int `json:"httpPort,omitempty"`
}
Status holds the status of the function
type Trigger ¶
type Trigger struct {
Class string `json:"class"`
Kind string `json:"kind"`
Disabled bool `json:"disabled,omitempty"`
MaxWorkers int `json:"maxWorkers,omitempty"`
URL string `json:"url,omitempty"`
Paths []string `json:"paths,omitempty"`
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`
Secret string `json:"secret,omitempty"`
Partitions []Partition `json:"partitions,omitempty"`
Annotations map[string]string `json:"annotations,omitempty"`
WorkerAvailabilityTimeoutMilliseconds int `json:"workerAvailabilityTimeoutMilliseconds,omitempty"`
WorkerAllocatorName string `json:"workerAllocatorName,omitempty"`
// Dealer Information
TotalTasks int `json:"total_tasks,omitempty"`
MaxTaskAllocation int `json:"max_task_allocation,omitempty"`
// General attributes
Attributes map[string]interface{} `json:"attributes,omitempty"`
}
Trigger holds configuration for a trigger