Documentation ¶
Index ¶
- Constants
- Variables
- type AppVersionState
- func (*AppVersionState) Descriptor() ([]byte, []int)deprecated
- func (x *AppVersionState) GetApp() string
- func (x *AppVersionState) GetDeploymentId() string
- func (x *AppVersionState) GetGroups() map[string]*ColocationGroupState
- func (x *AppVersionState) GetListeners() []*protos.Listener
- func (x *AppVersionState) GetProcesses() map[string]*ProcessState
- func (x *AppVersionState) GetSubmissionTime() *timestamppb.Timestamp
- func (*AppVersionState) ProtoMessage()
- func (x *AppVersionState) ProtoReflect() protoreflect.Message
- func (x *AppVersionState) Reset()
- func (x *AppVersionState) String() string
- type Babysitter
- func (b *Babysitter) CreateAndRunEnvelopeForMain(mainWlet *protos.Weavelet) (int, int, error)
- func (b *Babysitter) ExportListener(req *protos.ListenerToExport) (*protos.ExportListenerReply, error)
- func (b *Babysitter) GetComponentsToStart(req *protos.GetComponentsToStart) (*protos.ComponentsToStart, error)
- func (b *Babysitter) GetRoutingInfo(req *protos.GetRoutingInfo) (*protos.RoutingInfo, error)
- func (b *Babysitter) Metrics(ctx context.Context) (*status.Metrics, error)
- func (b *Babysitter) Profile(_ context.Context, req *protos.RunProfiling) (*protos.Profile, error)
- func (b *Babysitter) RecvLogEntry(entry *protos.LogEntry)
- func (b *Babysitter) RecvTraceSpans(spans []trace.ReadOnlySpan) error
- func (b *Babysitter) RegisterReplica(req *protos.ReplicaToRegister) error
- func (b *Babysitter) RegisterStatusPages(mux *http.ServeMux)
- func (b *Babysitter) ReportLoad(*protos.WeaveletLoadReport) error
- func (b *Babysitter) StartColocationGroup(req *protos.ColocationGroup) error
- func (b *Babysitter) StartComponent(req *protos.ComponentToStart) error
- func (b *Babysitter) Status(ctx context.Context) (*status.Status, error)
- type ColocationGroupState
- func (*ColocationGroupState) Descriptor() ([]byte, []int)deprecated
- func (x *ColocationGroupState) GetProcesses() []string
- func (*ColocationGroupState) ProtoMessage()
- func (x *ColocationGroupState) ProtoReflect() protoreflect.Message
- func (x *ColocationGroupState) Reset()
- func (x *ColocationGroupState) String() string
- type ProcessState
- func (*ProcessState) Descriptor() ([]byte, []int)deprecated
- func (x *ProcessState) GetAssignments() map[string]*protos.Assignment
- func (x *ProcessState) GetComponents() map[string]bool
- func (x *ProcessState) GetReplicaPids() []int64
- func (x *ProcessState) GetReplicas() []string
- func (*ProcessState) ProtoMessage()
- func (x *ProcessState) ProtoReflect() protoreflect.Message
- func (x *ProcessState) Reset()
- func (x *ProcessState) String() string
Constants ¶
const (
// The default replication factor for a component.
DefaultReplication = 2
)
Variables ¶
var File_internal_babysitter_babysitter_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type AppVersionState ¶
type AppVersionState struct { App string `protobuf:"bytes,1,opt,name=app,proto3" json:"app,omitempty"` DeploymentId string `protobuf:"bytes,2,opt,name=deployment_id,json=deploymentId,proto3" json:"deployment_id,omitempty"` SubmissionTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=submission_time,json=submissionTime,proto3" json:"submission_time,omitempty"` Groups map[string]*ColocationGroupState `` // per group information /* 153-byte string literal not displayed */ Processes map[string]*ProcessState `` // per process information /* 159-byte string literal not displayed */ Listeners []*protos.Listener `protobuf:"bytes,6,rep,name=listeners,proto3" json:"listeners,omitempty"` // per listener information // contains filtered or unexported fields }
AppVersionState contains state managed for an application version by the babysitter.
func (*AppVersionState) Descriptor
deprecated
func (*AppVersionState) Descriptor() ([]byte, []int)
Deprecated: Use AppVersionState.ProtoReflect.Descriptor instead.
func (*AppVersionState) GetApp ¶
func (x *AppVersionState) GetApp() string
func (*AppVersionState) GetDeploymentId ¶
func (x *AppVersionState) GetDeploymentId() string
func (*AppVersionState) GetGroups ¶
func (x *AppVersionState) GetGroups() map[string]*ColocationGroupState
func (*AppVersionState) GetListeners ¶
func (x *AppVersionState) GetListeners() []*protos.Listener
func (*AppVersionState) GetProcesses ¶
func (x *AppVersionState) GetProcesses() map[string]*ProcessState
func (*AppVersionState) GetSubmissionTime ¶
func (x *AppVersionState) GetSubmissionTime() *timestamppb.Timestamp
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 Babysitter ¶
type Babysitter struct {
// contains filtered or unexported fields
}
Babysitter manages an application version deployment.
func NewBabysitter ¶
func NewBabysitter(ctx context.Context, dep *protos.Deployment, logSaver func(*protos.LogEntry)) (*Babysitter, error)
NewBabysitter creates a new babysitter.
func (*Babysitter) CreateAndRunEnvelopeForMain ¶
CreateAndRunEnvelopeForMain creates an envelope for an already started main. It is used by weavertest where the main process is already running.
func (*Babysitter) ExportListener ¶
func (b *Babysitter) ExportListener(req *protos.ListenerToExport) (*protos.ExportListenerReply, error)
ExportListener implements the protos.EnvelopeHandler interface.
func (*Babysitter) GetComponentsToStart ¶
func (b *Babysitter) GetComponentsToStart(req *protos.GetComponentsToStart) (*protos.ComponentsToStart, error)
GetComponentsToStart implements the protos.EnvelopeHandler interface.
func (*Babysitter) GetRoutingInfo ¶
func (b *Babysitter) GetRoutingInfo(req *protos.GetRoutingInfo) (*protos.RoutingInfo, error)
GetRoutingInfo implements the protos.EnvelopeHandler interface.
func (*Babysitter) Profile ¶
func (b *Babysitter) Profile(_ context.Context, req *protos.RunProfiling) (*protos.Profile, error)
Profile implements the status.Server interface.
func (*Babysitter) RecvLogEntry ¶
func (b *Babysitter) RecvLogEntry(entry *protos.LogEntry)
RecvLogEntry implements the protos.EnvelopeHandler interface.
func (*Babysitter) RecvTraceSpans ¶
func (b *Babysitter) RecvTraceSpans(spans []trace.ReadOnlySpan) error
RecvTraceSpans implements the protos.EnvelopeHandler interface.
func (*Babysitter) RegisterReplica ¶
func (b *Babysitter) RegisterReplica(req *protos.ReplicaToRegister) error
RegisterReplica implements the protos.EnvelopeHandler interface.
func (*Babysitter) RegisterStatusPages ¶
func (b *Babysitter) RegisterStatusPages(mux *http.ServeMux)
RegisterStatusPages registers the status pages with the provided mux.
func (*Babysitter) ReportLoad ¶
func (b *Babysitter) ReportLoad(*protos.WeaveletLoadReport) error
ReportLoad implements the protos.EnvelopeHandler interface.
func (*Babysitter) StartColocationGroup ¶
func (b *Babysitter) StartColocationGroup(req *protos.ColocationGroup) error
StartColocationGroup implements the protos.EnvelopeHandler interface.
func (*Babysitter) StartComponent ¶
func (b *Babysitter) StartComponent(req *protos.ComponentToStart) error
StartComponent implements the protos.EnvelopeHandler interface.
type ColocationGroupState ¶
type ColocationGroupState struct { // It contains the set of processes that a colocation group in a given // deployment should be running. Processes []string `protobuf:"bytes,1,rep,name=processes,proto3" json:"processes,omitempty"` // contains filtered or unexported fields }
func (*ColocationGroupState) Descriptor
deprecated
func (*ColocationGroupState) Descriptor() ([]byte, []int)
Deprecated: Use ColocationGroupState.ProtoReflect.Descriptor instead.
func (*ColocationGroupState) GetProcesses ¶
func (x *ColocationGroupState) GetProcesses() []string
func (*ColocationGroupState) ProtoMessage ¶
func (*ColocationGroupState) ProtoMessage()
func (*ColocationGroupState) ProtoReflect ¶
func (x *ColocationGroupState) ProtoReflect() protoreflect.Message
func (*ColocationGroupState) Reset ¶
func (x *ColocationGroupState) Reset()
func (*ColocationGroupState) String ¶
func (x *ColocationGroupState) String() string
type ProcessState ¶
type ProcessState struct { // It contains the set of components that a process in a given deployment // should be running, along with their routing status (whether a component is // routed). Components map[string]bool `` /* 162-byte string literal not displayed */ // It contains the list of replica addresses for the process. Replicas []string `protobuf:"bytes,2,rep,name=replicas,proto3" json:"replicas,omitempty"` // It contains the list of replica pids for the process. ReplicaPids []int64 `protobuf:"varint,4,rep,packed,name=replica_pids,json=replicaPids,proto3" json:"replica_pids,omitempty"` // It contains the list of assignments for the routed components that are // running by a process. Assignments map[string]*protos.Assignment `` /* 163-byte string literal not displayed */ // contains filtered or unexported fields }
func (*ProcessState) Descriptor
deprecated
func (*ProcessState) Descriptor() ([]byte, []int)
Deprecated: Use ProcessState.ProtoReflect.Descriptor instead.
func (*ProcessState) GetAssignments ¶
func (x *ProcessState) GetAssignments() map[string]*protos.Assignment
func (*ProcessState) GetComponents ¶
func (x *ProcessState) GetComponents() map[string]bool
func (*ProcessState) GetReplicaPids ¶
func (x *ProcessState) GetReplicaPids() []int64
func (*ProcessState) GetReplicas ¶
func (x *ProcessState) GetReplicas() []string
func (*ProcessState) ProtoMessage ¶
func (*ProcessState) ProtoMessage()
func (*ProcessState) ProtoReflect ¶
func (x *ProcessState) ProtoReflect() protoreflect.Message
func (*ProcessState) Reset ¶
func (x *ProcessState) Reset()
func (*ProcessState) String ¶
func (x *ProcessState) String() string