Documentation ¶
Overview ¶
Package controller handles the deployment of new application versions.
It receives application versions from the command-line tool, generates a rollout strategy for each, and manages their rollout.
Index ¶
- Constants
- Variables
- func Start(ctx context.Context, mux *http.ServeMux, store store.Store, ...) (*controller, error)
- type AppState
- type AppStatus
- func (*AppStatus) Descriptor() ([]byte, []int)deprecated
- func (x *AppStatus) GetApp() string
- func (x *AppStatus) GetProjectedTraffic() *ProjectedTraffic
- func (x *AppStatus) GetVersions() []*AppVersionStatus
- func (*AppStatus) ProtoMessage()
- func (x *AppStatus) ProtoReflect() protoreflect.Message
- func (x *AppStatus) Reset()
- func (x *AppStatus) String() string
- type AppVersionDistributorState
- func (*AppVersionDistributorState) Descriptor() ([]byte, []int)deprecated
- func (x *AppVersionDistributorState) GetProcesses() *nanny.ProcessState
- func (x *AppVersionDistributorState) GetStatus() AppVersionDistributorStatus
- func (x *AppVersionDistributorState) GetWaveIdx() int64
- func (*AppVersionDistributorState) ProtoMessage()
- func (x *AppVersionDistributorState) ProtoReflect() protoreflect.Message
- func (x *AppVersionDistributorState) Reset()
- func (x *AppVersionDistributorState) String() string
- type AppVersionDistributorStatus
- func (AppVersionDistributorStatus) Descriptor() protoreflect.EnumDescriptor
- func (x AppVersionDistributorStatus) Enum() *AppVersionDistributorStatus
- func (AppVersionDistributorStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x AppVersionDistributorStatus) Number() protoreflect.EnumNumber
- func (x AppVersionDistributorStatus) String() string
- func (AppVersionDistributorStatus) Type() protoreflect.EnumType
- type AppVersionState
- func (*AppVersionState) Descriptor() ([]byte, []int)deprecated
- func (x *AppVersionState) GetConfig() *config.GKEConfig
- func (x *AppVersionState) GetDistributors() map[string]*AppVersionDistributorState
- func (x *AppVersionState) GetRolloutStrategy() *RolloutStrategy
- func (x *AppVersionState) GetSubmissionId() int64
- func (x *AppVersionState) GetSubmissionTime() *timestamppb.Timestamp
- func (x *AppVersionState) GetTimeWaveRolledOut() *timestamppb.Timestamp
- func (x *AppVersionState) GetTimeWaveStarted() *timestamppb.Timestamp
- func (x *AppVersionState) GetWaveIdx() int64
- func (*AppVersionState) ProtoMessage()
- func (x *AppVersionState) ProtoReflect() protoreflect.Message
- func (x *AppVersionState) Reset()
- func (x *AppVersionState) String() string
- type AppVersionStatus
- func (*AppVersionStatus) Descriptor() ([]byte, []int)deprecated
- func (x *AppVersionStatus) GetApp() string
- func (x *AppVersionStatus) GetConfig() *protos.AppConfig
- func (x *AppVersionStatus) GetGkeConfig() *config.GKEConfig
- func (x *AppVersionStatus) GetId() string
- func (x *AppVersionStatus) GetListeners() []*ListenerStatus
- func (x *AppVersionStatus) GetProcesses() []*ProcessStatus
- func (x *AppVersionStatus) GetStatus() AppVersionStatus_Status
- func (x *AppVersionStatus) GetSubmissionId() int64
- func (x *AppVersionStatus) GetSubmissionTime() *timestamppb.Timestamp
- func (*AppVersionStatus) ProtoMessage()
- func (x *AppVersionStatus) ProtoReflect() protoreflect.Message
- func (x *AppVersionStatus) Reset()
- func (x *AppVersionStatus) String() string
- type AppVersionStatus_Status
- func (AppVersionStatus_Status) Descriptor() protoreflect.EnumDescriptor
- func (x AppVersionStatus_Status) Enum() *AppVersionStatus_Status
- func (AppVersionStatus_Status) EnumDescriptor() ([]byte, []int)deprecated
- func (x AppVersionStatus_Status) Number() protoreflect.EnumNumber
- func (x AppVersionStatus_Status) String() string
- func (AppVersionStatus_Status) Type() protoreflect.EnumType
- type ControllerState
- func (*ControllerState) Descriptor() ([]byte, []int)deprecated
- func (x *ControllerState) GetApplications() map[string]bool
- func (x *ControllerState) GetDistributors() map[string]*DistributorState
- func (*ControllerState) ProtoMessage()
- func (x *ControllerState) ProtoReflect() protoreflect.Message
- func (x *ControllerState) Reset()
- func (x *ControllerState) String() string
- type DistributorState
- func (*DistributorState) Descriptor() ([]byte, []int)deprecated
- func (x *DistributorState) GetLocation() *RolloutRequest_Location
- func (x *DistributorState) GetTrafficAssignment() *nanny.TrafficAssignment
- func (*DistributorState) ProtoMessage()
- func (x *DistributorState) ProtoReflect() protoreflect.Message
- func (x *DistributorState) Reset()
- func (x *DistributorState) String() string
- type KillRequest
- type ListenerStatus
- func (*ListenerStatus) Descriptor() ([]byte, []int)deprecated
- func (x *ListenerStatus) GetHostname() []string
- func (x *ListenerStatus) GetName() string
- func (x *ListenerStatus) GetPublic() bool
- func (*ListenerStatus) ProtoMessage()
- func (x *ListenerStatus) ProtoReflect() protoreflect.Message
- func (x *ListenerStatus) Reset()
- func (x *ListenerStatus) String() string
- type ProcessStatus
- func (*ProcessStatus) Descriptor() ([]byte, []int)deprecated
- func (x *ProcessStatus) GetComponents() []string
- func (x *ProcessStatus) GetHealthyReplicas() int64
- func (x *ProcessStatus) GetLocation() string
- func (x *ProcessStatus) GetName() string
- func (x *ProcessStatus) GetTotalReplicas() int64
- func (*ProcessStatus) ProtoMessage()
- func (x *ProcessStatus) ProtoReflect() protoreflect.Message
- func (x *ProcessStatus) Reset()
- func (x *ProcessStatus) String() string
- type ProjectedTraffic
- func (*ProjectedTraffic) Descriptor() ([]byte, []int)deprecated
- func (x *ProjectedTraffic) GetApp() string
- func (x *ProjectedTraffic) GetProjections() []*Projection
- func (*ProjectedTraffic) ProtoMessage()
- func (x *ProjectedTraffic) ProtoReflect() protoreflect.Message
- func (x *ProjectedTraffic) Reset()
- func (x *ProjectedTraffic) String() string
- type Projection
- func (*Projection) Descriptor() ([]byte, []int)deprecated
- func (x *Projection) GetTime() *timestamppb.Timestamp
- func (x *Projection) GetTraffic() *nanny.TrafficAssignment
- func (*Projection) ProtoMessage()
- func (x *Projection) ProtoReflect() protoreflect.Message
- func (x *Projection) Reset()
- func (x *Projection) String() string
- type RolloutRequest
- func (*RolloutRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RolloutRequest) GetConfig() *config.GKEConfig
- func (x *RolloutRequest) GetLocations() []*RolloutRequest_Location
- func (x *RolloutRequest) GetNannyAddr() string
- func (*RolloutRequest) ProtoMessage()
- func (x *RolloutRequest) ProtoReflect() protoreflect.Message
- func (x *RolloutRequest) Reset()
- func (x *RolloutRequest) String() string
- type RolloutRequest_Location
- func (*RolloutRequest_Location) Descriptor() ([]byte, []int)deprecated
- func (x *RolloutRequest_Location) GetDistributorAddr() string
- func (x *RolloutRequest_Location) GetName() string
- func (*RolloutRequest_Location) ProtoMessage()
- func (x *RolloutRequest_Location) ProtoReflect() protoreflect.Message
- func (x *RolloutRequest_Location) Reset()
- func (x *RolloutRequest_Location) String() string
- type RolloutStrategy
- type RolloutWave
- func (*RolloutWave) Descriptor() ([]byte, []int)deprecated
- func (x *RolloutWave) GetTargetFunctions() map[string]*nanny.TargetFn
- func (x *RolloutWave) GetWaitTime() *durationpb.Duration
- func (*RolloutWave) ProtoMessage()
- func (x *RolloutWave) ProtoReflect() protoreflect.Message
- func (x *RolloutWave) Reset()
- func (x *RolloutWave) String() string
- type Status
- func (*Status) Descriptor() ([]byte, []int)deprecated
- func (x *Status) GetApps() []*AppStatus
- func (x *Status) GetPrivateTraffic() []*nanny.TrafficAssignment
- func (x *Status) GetTraffic() *nanny.TrafficAssignment
- func (*Status) ProtoMessage()
- func (x *Status) ProtoReflect() protoreflect.Message
- func (x *Status) Reset()
- func (x *Status) String() string
- type StatusRequest
- func (*StatusRequest) Descriptor() ([]byte, []int)deprecated
- func (x *StatusRequest) GetApp() string
- func (x *StatusRequest) GetVersion() string
- func (*StatusRequest) ProtoMessage()
- func (x *StatusRequest) ProtoReflect() protoreflect.Message
- func (x *StatusRequest) Reset()
- func (x *StatusRequest) String() string
- type SubmissionId
Constants ¶
const ( // URL suffixes for various controller handlers. RolloutURL = "/controller/rollout" KillURL = "/controller/kill" StatusURL = "/controller/status" RunProfilingURL = "/controller/run_profiling" FetchMetricsURL = "/controller/fetch_metrics" )
Variables ¶
var ( AppVersionDistributorStatus_name = map[int32]string{ 0: "UNKNOWN", 1: "STARTING", 2: "ROLLING_OUT", 3: "ROLLED_OUT", 4: "DELETING", 5: "DELETED", } AppVersionDistributorStatus_value = map[string]int32{ "UNKNOWN": 0, "STARTING": 1, "ROLLING_OUT": 2, "ROLLED_OUT": 3, "DELETING": 4, "DELETED": 5, } )
Enum value maps for AppVersionDistributorStatus.
var ( AppVersionStatus_Status_name = map[int32]string{ 0: "UNKNOWN", 1: "ROLLING_OUT", 2: "ACTIVE", 3: "DELETING", } AppVersionStatus_Status_value = map[string]int32{ "UNKNOWN": 0, "ROLLING_OUT": 1, "ACTIVE": 2, "DELETING": 3, } )
Enum value maps for AppVersionStatus_Status.
var File_internal_nanny_controller_controller_proto protoreflect.FileDescriptor
Functions ¶
func Start ¶
func Start(ctx context.Context, mux *http.ServeMux, store store.Store, logger *logging.FuncLogger, actuationDelay time.Duration, distributor func(addr string) clients.DistributorClient, fetchAssignmentsInterval time.Duration, applyAssignmentInterval time.Duration, manageAppInterval time.Duration, applyTraffic func(context.Context, *nanny.TrafficAssignment) error) (*controller, error)
Start starts the controller service.
Types ¶
type AppState ¶
type AppState struct { // Application versions, keyed by version id. Versions map[string]*AppVersionState `` /* 157-byte string literal not displayed */ // contains filtered or unexported fields }
AppState contains the state managed for each application by the controller.
func (*AppState) Descriptor
deprecated
func (*AppState) GetVersions ¶
func (x *AppState) GetVersions() map[string]*AppVersionState
func (*AppState) ProtoMessage ¶
func (*AppState) ProtoMessage()
func (*AppState) ProtoReflect ¶
func (x *AppState) ProtoReflect() protoreflect.Message
type AppStatus ¶
type AppStatus struct { // The app's name. App string `protobuf:"bytes,1,opt,name=app,proto3" json:"app,omitempty"` // The status of every version of this app. Versions []*AppVersionStatus `protobuf:"bytes,2,rep,name=versions,proto3" json:"versions,omitempty"` // The rollout schedule of this app. ProjectedTraffic *ProjectedTraffic `protobuf:"bytes,3,opt,name=projected_traffic,json=projectedTraffic,proto3" json:"projected_traffic,omitempty"` // contains filtered or unexported fields }
AppStatus contains basic information about a given Service Weaver application.
func (*AppStatus) Descriptor
deprecated
func (*AppStatus) GetProjectedTraffic ¶
func (x *AppStatus) GetProjectedTraffic() *ProjectedTraffic
func (*AppStatus) GetVersions ¶
func (x *AppStatus) GetVersions() []*AppVersionStatus
func (*AppStatus) ProtoMessage ¶
func (*AppStatus) ProtoMessage()
func (*AppStatus) ProtoReflect ¶
func (x *AppStatus) ProtoReflect() protoreflect.Message
type AppVersionDistributorState ¶
type AppVersionDistributorState struct { WaveIdx int64 `protobuf:"varint,1,opt,name=wave_idx,json=waveIdx,proto3" json:"wave_idx,omitempty"` Status AppVersionDistributorStatus `protobuf:"varint,2,opt,name=status,proto3,enum=controller.AppVersionDistributorStatus" json:"status,omitempty"` // All known processes for this application version at the distributor. Processes *nanny.ProcessState `protobuf:"bytes,3,opt,name=processes,proto3" json:"processes,omitempty"` // contains filtered or unexported fields }
AppVersionDistributorState contains the state for a particular distributor in charge of managing an application version.
func (*AppVersionDistributorState) Descriptor
deprecated
func (*AppVersionDistributorState) Descriptor() ([]byte, []int)
Deprecated: Use AppVersionDistributorState.ProtoReflect.Descriptor instead.
func (*AppVersionDistributorState) GetProcesses ¶
func (x *AppVersionDistributorState) GetProcesses() *nanny.ProcessState
func (*AppVersionDistributorState) GetStatus ¶
func (x *AppVersionDistributorState) GetStatus() AppVersionDistributorStatus
func (*AppVersionDistributorState) GetWaveIdx ¶
func (x *AppVersionDistributorState) GetWaveIdx() int64
func (*AppVersionDistributorState) ProtoMessage ¶
func (*AppVersionDistributorState) ProtoMessage()
func (*AppVersionDistributorState) ProtoReflect ¶
func (x *AppVersionDistributorState) ProtoReflect() protoreflect.Message
func (*AppVersionDistributorState) Reset ¶
func (x *AppVersionDistributorState) Reset()
func (*AppVersionDistributorState) String ¶
func (x *AppVersionDistributorState) String() string
type AppVersionDistributorStatus ¶
type AppVersionDistributorStatus int32
AppVersionDistributorStatus specifies the latest status for a particular distributor in a given application version.
const ( AppVersionDistributorStatus_UNKNOWN AppVersionDistributorStatus = 0 AppVersionDistributorStatus_STARTING AppVersionDistributorStatus = 1 AppVersionDistributorStatus_ROLLING_OUT AppVersionDistributorStatus = 2 AppVersionDistributorStatus_ROLLED_OUT AppVersionDistributorStatus = 3 AppVersionDistributorStatus_DELETING AppVersionDistributorStatus = 4 AppVersionDistributorStatus_DELETED AppVersionDistributorStatus = 5 )
func (AppVersionDistributorStatus) Descriptor ¶
func (AppVersionDistributorStatus) Descriptor() protoreflect.EnumDescriptor
func (AppVersionDistributorStatus) Enum ¶
func (x AppVersionDistributorStatus) Enum() *AppVersionDistributorStatus
func (AppVersionDistributorStatus) EnumDescriptor
deprecated
func (AppVersionDistributorStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use AppVersionDistributorStatus.Descriptor instead.
func (AppVersionDistributorStatus) Number ¶
func (x AppVersionDistributorStatus) Number() protoreflect.EnumNumber
func (AppVersionDistributorStatus) String ¶
func (x AppVersionDistributorStatus) String() string
func (AppVersionDistributorStatus) Type ¶
func (AppVersionDistributorStatus) Type() protoreflect.EnumType
type AppVersionState ¶
type AppVersionState struct { Config *config.GKEConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` RolloutStrategy *RolloutStrategy `protobuf:"bytes,2,opt,name=rollout_strategy,json=rolloutStrategy,proto3" json:"rollout_strategy,omitempty"` // Distributors state for a given application version. Distributors map[string]*AppVersionDistributorState `` /* 165-byte string literal not displayed */ // Unique identifier that captures the order in which the application version // was submitted for rollout at the controller. SubmissionId int64 `protobuf:"varint,5,opt,name=submission_id,json=submissionId,proto3" json:"submission_id,omitempty"` // The time when the application version was submitted to the controller. SubmissionTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=submission_time,json=submissionTime,proto3" json:"submission_time,omitempty"` // The wave idx that has been rolling out. WaveIdx int64 `protobuf:"varint,6,opt,name=wave_idx,json=waveIdx,proto3" json:"wave_idx,omitempty"` // The time when the current wave was started, or nil if rollout is done // (i.e., wave_idx equals the number of waves). TimeWaveStarted *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=time_wave_started,json=timeWaveStarted,proto3" json:"time_wave_started,omitempty"` // The time when the wave was successfully rolled out. TimeWaveRolledOut *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=time_wave_rolled_out,json=timeWaveRolledOut,proto3" json:"time_wave_rolled_out,omitempty"` // contains filtered or unexported fields }
AppVersionState contains the state managed for each application version by the controller.
func (*AppVersionState) Descriptor
deprecated
func (*AppVersionState) Descriptor() ([]byte, []int)
Deprecated: Use AppVersionState.ProtoReflect.Descriptor instead.
func (*AppVersionState) GetConfig ¶
func (x *AppVersionState) GetConfig() *config.GKEConfig
func (*AppVersionState) GetDistributors ¶
func (x *AppVersionState) GetDistributors() map[string]*AppVersionDistributorState
func (*AppVersionState) GetRolloutStrategy ¶
func (x *AppVersionState) GetRolloutStrategy() *RolloutStrategy
func (*AppVersionState) GetSubmissionId ¶
func (x *AppVersionState) GetSubmissionId() int64
func (*AppVersionState) GetSubmissionTime ¶
func (x *AppVersionState) GetSubmissionTime() *timestamppb.Timestamp
func (*AppVersionState) GetTimeWaveRolledOut ¶
func (x *AppVersionState) GetTimeWaveRolledOut() *timestamppb.Timestamp
func (*AppVersionState) GetTimeWaveStarted ¶
func (x *AppVersionState) GetTimeWaveStarted() *timestamppb.Timestamp
func (*AppVersionState) GetWaveIdx ¶
func (x *AppVersionState) GetWaveIdx() int64
func (*AppVersionState) ProtoMessage ¶
func (*AppVersionState) ProtoMessage()
func (*AppVersionState) ProtoReflect ¶
func (x *AppVersionState) ProtoReflect() protoreflect.Message
func (*AppVersionState) Reset ¶
func (x *AppVersionState) Reset()
func (*AppVersionState) String ¶
func (x *AppVersionState) String() string
type AppVersionStatus ¶
type AppVersionStatus struct { App string `protobuf:"bytes,1,opt,name=app,proto3" json:"app,omitempty"` // the app name (e.g., collatz) Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` // the deployment id (e.g., a83903259a93) SubmissionId int64 `protobuf:"varint,3,opt,name=submission_id,json=submissionId,proto3" json:"submission_id,omitempty"` // the unique sequence number (e.g., 0, 1, 2) SubmissionTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=submission_time,json=submissionTime,proto3" json:"submission_time,omitempty"` GkeConfig *config.GKEConfig `protobuf:"bytes,5,opt,name=gke_config,json=gkeConfig,proto3" json:"gke_config,omitempty"` // GKE config for this deployment. Config *protos.AppConfig `protobuf:"bytes,6,opt,name=config,proto3" json:"config,omitempty"` // Config for this deployment. Status AppVersionStatus_Status `protobuf:"varint,7,opt,name=status,proto3,enum=controller.AppVersionStatus_Status" json:"status,omitempty"` Processes []*ProcessStatus `protobuf:"bytes,8,rep,name=processes,proto3" json:"processes,omitempty"` Listeners []*ListenerStatus `protobuf:"bytes,9,rep,name=listeners,proto3" json:"listeners,omitempty"` // contains filtered or unexported fields }
AppVersionStatus contains basic information about a given Service Weaver application version.
func (*AppVersionStatus) Descriptor
deprecated
func (*AppVersionStatus) Descriptor() ([]byte, []int)
Deprecated: Use AppVersionStatus.ProtoReflect.Descriptor instead.
func (*AppVersionStatus) GetApp ¶
func (x *AppVersionStatus) GetApp() string
func (*AppVersionStatus) GetConfig ¶
func (x *AppVersionStatus) GetConfig() *protos.AppConfig
func (*AppVersionStatus) GetGkeConfig ¶
func (x *AppVersionStatus) GetGkeConfig() *config.GKEConfig
func (*AppVersionStatus) GetId ¶
func (x *AppVersionStatus) GetId() string
func (*AppVersionStatus) GetListeners ¶
func (x *AppVersionStatus) GetListeners() []*ListenerStatus
func (*AppVersionStatus) GetProcesses ¶
func (x *AppVersionStatus) GetProcesses() []*ProcessStatus
func (*AppVersionStatus) GetStatus ¶
func (x *AppVersionStatus) GetStatus() AppVersionStatus_Status
func (*AppVersionStatus) GetSubmissionId ¶
func (x *AppVersionStatus) GetSubmissionId() int64
func (*AppVersionStatus) GetSubmissionTime ¶
func (x *AppVersionStatus) GetSubmissionTime() *timestamppb.Timestamp
func (*AppVersionStatus) ProtoMessage ¶
func (*AppVersionStatus) ProtoMessage()
func (*AppVersionStatus) ProtoReflect ¶
func (x *AppVersionStatus) ProtoReflect() protoreflect.Message
func (*AppVersionStatus) Reset ¶
func (x *AppVersionStatus) Reset()
func (*AppVersionStatus) String ¶
func (x *AppVersionStatus) String() string
type AppVersionStatus_Status ¶
type AppVersionStatus_Status int32
const ( AppVersionStatus_UNKNOWN AppVersionStatus_Status = 0 AppVersionStatus_ROLLING_OUT AppVersionStatus_Status = 1 // the version is rolling out AppVersionStatus_ACTIVE AppVersionStatus_Status = 2 // the version has been fully rolled out AppVersionStatus_DELETING AppVersionStatus_Status = 3 // the version is being deleted )
func (AppVersionStatus_Status) Descriptor ¶
func (AppVersionStatus_Status) Descriptor() protoreflect.EnumDescriptor
func (AppVersionStatus_Status) Enum ¶
func (x AppVersionStatus_Status) Enum() *AppVersionStatus_Status
func (AppVersionStatus_Status) EnumDescriptor
deprecated
func (AppVersionStatus_Status) EnumDescriptor() ([]byte, []int)
Deprecated: Use AppVersionStatus_Status.Descriptor instead.
func (AppVersionStatus_Status) Number ¶
func (x AppVersionStatus_Status) Number() protoreflect.EnumNumber
func (AppVersionStatus_Status) String ¶
func (x AppVersionStatus_Status) String() string
func (AppVersionStatus_Status) Type ¶
func (AppVersionStatus_Status) Type() protoreflect.EnumType
type ControllerState ¶
type ControllerState struct { Applications map[string]bool `` /* 166-byte string literal not displayed */ Distributors map[string]*DistributorState `` /* 165-byte string literal not displayed */ // contains filtered or unexported fields }
ControllerState contains the state maintained by the controller.
func (*ControllerState) Descriptor
deprecated
func (*ControllerState) Descriptor() ([]byte, []int)
Deprecated: Use ControllerState.ProtoReflect.Descriptor instead.
func (*ControllerState) GetApplications ¶
func (x *ControllerState) GetApplications() map[string]bool
func (*ControllerState) GetDistributors ¶
func (x *ControllerState) GetDistributors() map[string]*DistributorState
func (*ControllerState) ProtoMessage ¶
func (*ControllerState) ProtoMessage()
func (*ControllerState) ProtoReflect ¶
func (x *ControllerState) ProtoReflect() protoreflect.Message
func (*ControllerState) Reset ¶
func (x *ControllerState) Reset()
func (*ControllerState) String ¶
func (x *ControllerState) String() string
type DistributorState ¶
type DistributorState struct { // Distributor location. Location *RolloutRequest_Location `protobuf:"bytes,1,opt,name=location,proto3" json:"location,omitempty"` // Latest traffic assignment for public listeners received from the // corresponding distributor. TrafficAssignment *nanny.TrafficAssignment `protobuf:"bytes,2,opt,name=traffic_assignment,json=trafficAssignment,proto3" json:"traffic_assignment,omitempty"` // contains filtered or unexported fields }
DistributorState contains the traffic assignment at a given distributor.
func (*DistributorState) Descriptor
deprecated
func (*DistributorState) Descriptor() ([]byte, []int)
Deprecated: Use DistributorState.ProtoReflect.Descriptor instead.
func (*DistributorState) GetLocation ¶
func (x *DistributorState) GetLocation() *RolloutRequest_Location
func (*DistributorState) GetTrafficAssignment ¶
func (x *DistributorState) GetTrafficAssignment() *nanny.TrafficAssignment
func (*DistributorState) ProtoMessage ¶
func (*DistributorState) ProtoMessage()
func (*DistributorState) ProtoReflect ¶
func (x *DistributorState) ProtoReflect() protoreflect.Message
func (*DistributorState) Reset ¶
func (x *DistributorState) Reset()
func (*DistributorState) String ¶
func (x *DistributorState) String() string
type KillRequest ¶
type KillRequest struct { App string `protobuf:"bytes,1,opt,name=app,proto3" json:"app,omitempty"` // the app to kill // contains filtered or unexported fields }
KillRequest is a request to kill every deployment of a Service Weaver application.
func (*KillRequest) Descriptor
deprecated
func (*KillRequest) Descriptor() ([]byte, []int)
Deprecated: Use KillRequest.ProtoReflect.Descriptor instead.
func (*KillRequest) GetApp ¶
func (x *KillRequest) GetApp() string
func (*KillRequest) ProtoMessage ¶
func (*KillRequest) ProtoMessage()
func (*KillRequest) ProtoReflect ¶
func (x *KillRequest) ProtoReflect() protoreflect.Message
func (*KillRequest) Reset ¶
func (x *KillRequest) Reset()
func (*KillRequest) String ¶
func (x *KillRequest) String() string
type ListenerStatus ¶
type ListenerStatus struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // listener name Public bool `protobuf:"varint,2,opt,name=public,proto3" json:"public,omitempty"` // is the listener public? Hostname []string `protobuf:"bytes,3,rep,name=hostname,proto3" json:"hostname,omitempty"` // hostnames the listener is reachable at. // contains filtered or unexported fields }
func (*ListenerStatus) Descriptor
deprecated
func (*ListenerStatus) Descriptor() ([]byte, []int)
Deprecated: Use ListenerStatus.ProtoReflect.Descriptor instead.
func (*ListenerStatus) GetHostname ¶
func (x *ListenerStatus) GetHostname() []string
func (*ListenerStatus) GetName ¶
func (x *ListenerStatus) GetName() string
func (*ListenerStatus) GetPublic ¶
func (x *ListenerStatus) GetPublic() bool
func (*ListenerStatus) ProtoMessage ¶
func (*ListenerStatus) ProtoMessage()
func (*ListenerStatus) ProtoReflect ¶
func (x *ListenerStatus) ProtoReflect() protoreflect.Message
func (*ListenerStatus) Reset ¶
func (x *ListenerStatus) Reset()
func (*ListenerStatus) String ¶
func (x *ListenerStatus) String() string
type ProcessStatus ¶
type ProcessStatus struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // process name Location string `protobuf:"bytes,2,opt,name=location,proto3" json:"location,omitempty"` // location (e.g., us-east1) HealthyReplicas int64 `protobuf:"varint,3,opt,name=healthy_replicas,json=healthyReplicas,proto3" json:"healthy_replicas,omitempty"` // number of healthy replicas TotalReplicas int64 `protobuf:"varint,4,opt,name=total_replicas,json=totalReplicas,proto3" json:"total_replicas,omitempty"` // number of total replicas Components []string `protobuf:"bytes,5,rep,name=components,proto3" json:"components,omitempty"` // active components // contains filtered or unexported fields }
func (*ProcessStatus) Descriptor
deprecated
func (*ProcessStatus) Descriptor() ([]byte, []int)
Deprecated: Use ProcessStatus.ProtoReflect.Descriptor instead.
func (*ProcessStatus) GetComponents ¶
func (x *ProcessStatus) GetComponents() []string
func (*ProcessStatus) GetHealthyReplicas ¶
func (x *ProcessStatus) GetHealthyReplicas() int64
func (*ProcessStatus) GetLocation ¶
func (x *ProcessStatus) GetLocation() string
func (*ProcessStatus) GetName ¶
func (x *ProcessStatus) GetName() string
func (*ProcessStatus) GetTotalReplicas ¶
func (x *ProcessStatus) GetTotalReplicas() int64
func (*ProcessStatus) ProtoMessage ¶
func (*ProcessStatus) ProtoMessage()
func (*ProcessStatus) ProtoReflect ¶
func (x *ProcessStatus) ProtoReflect() protoreflect.Message
func (*ProcessStatus) Reset ¶
func (x *ProcessStatus) Reset()
func (*ProcessStatus) String ¶
func (x *ProcessStatus) String() string
type ProjectedTraffic ¶
type ProjectedTraffic struct { App string `protobuf:"bytes,1,opt,name=app,proto3" json:"app,omitempty"` Projections []*Projection `protobuf:"bytes,2,rep,name=projections,proto3" json:"projections,omitempty"` // contains filtered or unexported fields }
ProjectedTraffic contains the projected traffic assignments for a particular application.
func (*ProjectedTraffic) Descriptor
deprecated
func (*ProjectedTraffic) Descriptor() ([]byte, []int)
Deprecated: Use ProjectedTraffic.ProtoReflect.Descriptor instead.
func (*ProjectedTraffic) GetApp ¶
func (x *ProjectedTraffic) GetApp() string
func (*ProjectedTraffic) GetProjections ¶
func (x *ProjectedTraffic) GetProjections() []*Projection
func (*ProjectedTraffic) ProtoMessage ¶
func (*ProjectedTraffic) ProtoMessage()
func (*ProjectedTraffic) ProtoReflect ¶
func (x *ProjectedTraffic) ProtoReflect() protoreflect.Message
func (*ProjectedTraffic) Reset ¶
func (x *ProjectedTraffic) Reset()
func (*ProjectedTraffic) String ¶
func (x *ProjectedTraffic) String() string
type Projection ¶
type Projection struct { Time *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"` Traffic *nanny.TrafficAssignment `protobuf:"bytes,2,opt,name=traffic,proto3" json:"traffic,omitempty"` // contains filtered or unexported fields }
Projection is the projected traffic assignment at a given point in time.
func (*Projection) Descriptor
deprecated
func (*Projection) Descriptor() ([]byte, []int)
Deprecated: Use Projection.ProtoReflect.Descriptor instead.
func (*Projection) GetTime ¶
func (x *Projection) GetTime() *timestamppb.Timestamp
func (*Projection) GetTraffic ¶
func (x *Projection) GetTraffic() *nanny.TrafficAssignment
func (*Projection) ProtoMessage ¶
func (*Projection) ProtoMessage()
func (*Projection) ProtoReflect ¶
func (x *Projection) ProtoReflect() protoreflect.Message
func (*Projection) Reset ¶
func (x *Projection) Reset()
func (*Projection) String ¶
func (x *Projection) String() string
type RolloutRequest ¶
type RolloutRequest struct { // Deployment information for the application. Config *config.GKEConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` // Address of the nanny in charge of the rollout. NannyAddr string `protobuf:"bytes,2,opt,name=NannyAddr,proto3" json:"NannyAddr,omitempty"` // A list of locations to rollout the application to. Locations []*RolloutRequest_Location `protobuf:"bytes,3,rep,name=locations,proto3" json:"locations,omitempty"` // contains filtered or unexported fields }
RolloutRequest is a request to the controller to roll out a new application version across a number of deploying locations.
func (*RolloutRequest) Descriptor
deprecated
func (*RolloutRequest) Descriptor() ([]byte, []int)
Deprecated: Use RolloutRequest.ProtoReflect.Descriptor instead.
func (*RolloutRequest) GetConfig ¶
func (x *RolloutRequest) GetConfig() *config.GKEConfig
func (*RolloutRequest) GetLocations ¶
func (x *RolloutRequest) GetLocations() []*RolloutRequest_Location
func (*RolloutRequest) GetNannyAddr ¶
func (x *RolloutRequest) GetNannyAddr() string
func (*RolloutRequest) ProtoMessage ¶
func (*RolloutRequest) ProtoMessage()
func (*RolloutRequest) ProtoReflect ¶
func (x *RolloutRequest) ProtoReflect() protoreflect.Message
func (*RolloutRequest) Reset ¶
func (x *RolloutRequest) Reset()
func (*RolloutRequest) String ¶
func (x *RolloutRequest) String() string
type RolloutRequest_Location ¶
type RolloutRequest_Location struct { // A descriptive name for the location (e.g., a cloud region). Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Address of the distributor that manages traffic for the application. DistributorAddr string `protobuf:"bytes,2,opt,name=distributor_addr,json=distributorAddr,proto3" json:"distributor_addr,omitempty"` // contains filtered or unexported fields }
RolloutRequest_Location stores information about the location where the application is being rolled out.
func (*RolloutRequest_Location) Descriptor
deprecated
func (*RolloutRequest_Location) Descriptor() ([]byte, []int)
Deprecated: Use RolloutRequest_Location.ProtoReflect.Descriptor instead.
func (*RolloutRequest_Location) GetDistributorAddr ¶
func (x *RolloutRequest_Location) GetDistributorAddr() string
func (*RolloutRequest_Location) GetName ¶
func (x *RolloutRequest_Location) GetName() string
func (*RolloutRequest_Location) ProtoMessage ¶
func (*RolloutRequest_Location) ProtoMessage()
func (*RolloutRequest_Location) ProtoReflect ¶
func (x *RolloutRequest_Location) ProtoReflect() protoreflect.Message
func (*RolloutRequest_Location) Reset ¶
func (x *RolloutRequest_Location) Reset()
func (*RolloutRequest_Location) String ¶
func (x *RolloutRequest_Location) String() string
type RolloutStrategy ¶
type RolloutStrategy struct { Waves []*RolloutWave `protobuf:"bytes,1,rep,name=waves,proto3" json:"waves,omitempty"` // contains filtered or unexported fields }
rolloutStrategy contains the strategy for rolling out an application version.
A rollout strategy consists of a number of waves. Each wave consists of a number of locations and their assigned traffic fractions.
E.g., Application version X should be rolled out in 8 locations (loc0...loc7) Expected duration to complete the rollout is 8h. Half of the time should be spent applying traffic and half of the time waiting to see whether there are any errors.
A possible rollout strategy is as follows:
Allocate 4 waves (i.e, in each wave 1h will be spent applying the traffic function, and 1h will be spent waiting)
First wave will contain the canary location (loc0)
All other locations will be assigned to the other waves
For each location, the target function can be the same and consists of:
4 pairs (duration, trafficFraction)
e.g., targetFn: {(15m: 10%), (15m, 25%), (15m, 50%), (15m, 100%)}
The rollout strategy will look as follows: wave 0: rollouts: { loc0 : nanny.TargetFn{(15m: 10%), (15m, 25%), (15m, 50%), (15m, 100%)}
validationTime: 1h } wave 1: rollouts: { loc1 : nanny.TargetFn{(15m: 10%), (15m, 25%), (15m, 50%), (15m, 100%)} loc4 : nanny.TargetFn{(15m: 10%), (15m, 25%), (15m, 50%), (15m, 100%)}
validationTime: 1h } wave 2: rollouts: { loc2 : nanny.TargetFn{(15m: 10%), (15m, 25%), (15m, 50%), (15m, 100%)} loc5 : nanny.TargetFn{(15m: 10%), (15m, 25%), (15m, 50%), (15m, 100%)}
validationTime: 1h } wave 3: rollouts: { loc3 : nanny.TargetFn{(15m: 10%), (15m, 25%), (15m, 50%), (15m, 100%)} loc6 : nanny.TargetFn{(15m: 10%), (15m, 25%), (15m, 50%), (15m, 100%)} loc7 : nanny.TargetFn{(15m: 10%), (15m, 25%), (15m, 50%), (15m, 100%)}
validationTime: 1h }
func (*RolloutStrategy) Descriptor
deprecated
func (*RolloutStrategy) Descriptor() ([]byte, []int)
Deprecated: Use RolloutStrategy.ProtoReflect.Descriptor instead.
func (*RolloutStrategy) GetWaves ¶
func (x *RolloutStrategy) GetWaves() []*RolloutWave
func (*RolloutStrategy) ProtoMessage ¶
func (*RolloutStrategy) ProtoMessage()
func (*RolloutStrategy) ProtoReflect ¶
func (x *RolloutStrategy) ProtoReflect() protoreflect.Message
func (*RolloutStrategy) Reset ¶
func (x *RolloutStrategy) Reset()
func (*RolloutStrategy) String ¶
func (x *RolloutStrategy) String() string
type RolloutWave ¶
type RolloutWave struct { // List of traffic target functions, keyed by location. TargetFunctions map[string]*nanny.TargetFn `` /* 194-byte string literal not displayed */ // Time to wait after all the target functions have been applied before // declaring the wave as complete. WaitTime *durationpb.Duration `protobuf:"bytes,2,opt,name=wait_time,json=waitTime,proto3" json:"wait_time,omitempty"` // contains filtered or unexported fields }
RolloutWave contains per rollout wave information.
func (*RolloutWave) Descriptor
deprecated
func (*RolloutWave) Descriptor() ([]byte, []int)
Deprecated: Use RolloutWave.ProtoReflect.Descriptor instead.
func (*RolloutWave) GetTargetFunctions ¶
func (x *RolloutWave) GetTargetFunctions() map[string]*nanny.TargetFn
func (*RolloutWave) GetWaitTime ¶
func (x *RolloutWave) GetWaitTime() *durationpb.Duration
func (*RolloutWave) ProtoMessage ¶
func (*RolloutWave) ProtoMessage()
func (*RolloutWave) ProtoReflect ¶
func (x *RolloutWave) ProtoReflect() protoreflect.Message
func (*RolloutWave) Reset ¶
func (x *RolloutWave) Reset()
func (*RolloutWave) String ¶
func (x *RolloutWave) String() string
type Status ¶
type Status struct { // The status of every app. Apps []*AppStatus `protobuf:"bytes,1,rep,name=apps,proto3" json:"apps,omitempty"` // The current public traffic assignment. Traffic *nanny.TrafficAssignment `protobuf:"bytes,2,opt,name=traffic,proto3" json:"traffic,omitempty"` // The current private traffic assignments at every location. PrivateTraffic []*nanny.TrafficAssignment `protobuf:"bytes,3,rep,name=private_traffic,json=privateTraffic,proto3" json:"private_traffic,omitempty"` // contains filtered or unexported fields }
Status contains basic information about all of the Service Weaver applications.
func (*Status) Descriptor
deprecated
func (*Status) GetPrivateTraffic ¶
func (x *Status) GetPrivateTraffic() []*nanny.TrafficAssignment
func (*Status) GetTraffic ¶
func (x *Status) GetTraffic() *nanny.TrafficAssignment
func (*Status) ProtoMessage ¶
func (*Status) ProtoMessage()
func (*Status) ProtoReflect ¶
func (x *Status) ProtoReflect() protoreflect.Message
type StatusRequest ¶
type StatusRequest struct { // Application whose status should be retrieved. If empty, the status for // all known applications is retrieved. App string `protobuf:"bytes,1,opt,name=app,proto3" json:"app,omitempty"` // Application version whose status should be retrieved. If empty, the status // for all known application versions is retrieved. Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` // contains filtered or unexported fields }
StatusRequest is a request to fetch status for a given Service Weaver application version.
func (*StatusRequest) Descriptor
deprecated
func (*StatusRequest) Descriptor() ([]byte, []int)
Deprecated: Use StatusRequest.ProtoReflect.Descriptor instead.
func (*StatusRequest) GetApp ¶
func (x *StatusRequest) GetApp() string
func (*StatusRequest) GetVersion ¶
func (x *StatusRequest) GetVersion() string
func (*StatusRequest) ProtoMessage ¶
func (*StatusRequest) ProtoMessage()
func (*StatusRequest) ProtoReflect ¶
func (x *StatusRequest) ProtoReflect() protoreflect.Message
func (*StatusRequest) Reset ¶
func (x *StatusRequest) Reset()
func (*StatusRequest) String ¶
func (x *StatusRequest) String() string
type SubmissionId ¶
type SubmissionId struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
SubmissionId contains a unique, monotonically increasing id that is associated with a rollout at the submission time.
func (*SubmissionId) Descriptor
deprecated
func (*SubmissionId) Descriptor() ([]byte, []int)
Deprecated: Use SubmissionId.ProtoReflect.Descriptor instead.
func (*SubmissionId) GetId ¶
func (x *SubmissionId) GetId() int64
func (*SubmissionId) ProtoMessage ¶
func (*SubmissionId) ProtoMessage()
func (*SubmissionId) ProtoReflect ¶
func (x *SubmissionId) ProtoReflect() protoreflect.Message
func (*SubmissionId) Reset ¶
func (x *SubmissionId) Reset()
func (*SubmissionId) String ¶
func (x *SubmissionId) String() string