Documentation
¶
Index ¶
Constants ¶
View Source
const ( // FailedState is the failed state FailedState State = "failed" // InitialState is the init state InitialState State = "initial" // ActiveState is the active state ActiveState State = "active" // InactiveState is the inactive state InactiveState State = "inactive" // DestroyedState - only for keep fsm working DestroyedState State = "destroyed" // CreateEvent is the create event CreateEvent Event = "create" // StartEvent is the start event StartEvent Event = "start" // StopEvent is the stop event StopEvent Event = "stop" // UpdateEvent is the update event UpdateEvent Event = "update" // DeleteEvent is the delete event DeleteEvent Event = "delete" // ReadyEvent is the ready event ReadyEvent Event = "ready" // PendingEvent is the pending event PendingEvent Event = "pending" // ErrorEvent is the error event ErrorEvent Event = "error" )
View Source
const ( // AutoScaleMetricCPU is name of cpu metric AutoScaleMetricCPU = "cpu" // AutoScaleMetricConcurrency is the name of concurrency metric AutoScaleMetricConcurrency = "concurrency" // AutoScaleMetricRPS is the name of rps metric AutoScaleMetricRPS = "rps" // ProviderKnative is the FaaS provider Knative. ProviderKnative = "knative" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Admin ¶
type Admin struct {
// SyncInterval is the interval for reconciling local FaaSFunction state and FaaSProvider's.
SyncInterval string `yaml:"syncInterval" jsonschema:"required,format=duration"`
// Provider is the FaaSProvider.
Provider string `yaml:"provider" jsonschema:"required"`
// HTTPServer is the HTTP traffic gate for accepting ingress traffic.
HTTPServer *httpserver.Spec `yaml:"httpServer" jsonschema:"required"`
// Currently we only supports knative type faas provider, so this filed should be
// "required" right now.
Knative *Knative `yaml:"knative" jsonschema:"required"`
}
Admin describes the Function.
type FSM ¶
type FSM struct {
// contains filtered or unexported fields
}
FSM function is a finite state machine for managing faas function.
type Function ¶
type Function struct {
Spec *Spec `yaml:"spec" jsonschema:"required"`
Status *Status `yaml:"status" jsonschema:"required"`
Fsm *FSM `yaml:"fsm" jsonschema:"omitempty"`
}
Function contains the FaaSFunction's spec ,runtime status with a build-in fsm.
type Knative ¶
type Knative struct {
HostSuffix string `yaml:"hostSuffix" jsonschema:"required"`
NetworkLayerURL string `yaml:"networkLayerURL" jsonschema:"required,format=uri"`
Namespace string `yaml:"namespace" jsonschema:"omitempty"`
Timeout string `yaml:"timeout" jsonschema:"omitempty,format=duration"`
}
Knative is the faas provider Knative.
type Spec ¶
type Spec struct {
Name string `yaml:"name" jsonschema:"required"`
Image string `yaml:"image" jsonschema:"required"`
Port int `yaml:"port" jsonschema:"omitempty"`
AutoScaleType string `yaml:"autoScaleType" jsonschema:"required"`
AutoScaleValue string `yaml:"autoScaleValue" jsonschema:"required"`
MinReplica int `yaml:"minReplica" jsonschema:"omitempty"`
MaxReplica int `yaml:"maxReplica" jsonschema:"omitempty"`
LimitCPU string `yaml:"limitCPU" jsonschema:"omitempty"`
LimitMemory string `yaml:"limitMemory" jsonschema:"omitempty"`
RequestCPU string `yaml:"requestCPU" jsonschema:"omitempty"`
RequestMemory string `yaml:"requestMemory" jsonschema:"omitempty"`
RequestAdaptor *requestadaptor.Spec `yaml:"requestAdaptor" jsonschema:"required"`
}
Spec is the spec of FaaSFunction.
Click to show internal directories.
Click to hide internal directories.