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) 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) ExportListener(req *protos.ExportListenerRequest) (*protos.ExportListenerReply, error)
- func (b *Babysitter) GetAddress(req *protos.GetAddressRequest) (*protos.GetAddressReply, 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) 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) GetAssignments() map[string]*protos.Assignment
- func (x *ColocationGroupState) GetComponents() map[string]bool
- func (x *ColocationGroupState) GetName() string
- func (x *ColocationGroupState) GetReplicaPids() []int64
- func (x *ColocationGroupState) GetReplicas() []string
- func (*ColocationGroupState) ProtoMessage()
- func (x *ColocationGroupState) ProtoReflect() protoreflect.Message
- func (x *ColocationGroupState) Reset()
- func (x *ColocationGroupState) 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 */ Listeners []*protos.Listener `protobuf:"bytes,5,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) 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) ExportListener ¶
func (b *Babysitter) ExportListener(req *protos.ExportListenerRequest) (*protos.ExportListenerReply, error)
ExportListener implements the protos.EnvelopeHandler interface.
func (*Babysitter) GetAddress ¶ added in v0.1.2
func (b *Babysitter) GetAddress(req *protos.GetAddressRequest) (*protos.GetAddressReply, error)
GetAddress 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) StartComponent ¶
func (b *Babysitter) StartComponent(req *protos.ComponentToStart) error
StartComponent implements the protos.EnvelopeHandler interface.
type ColocationGroupState ¶
type ColocationGroupState struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Name of the colocation group. // Set of components that a colocation group 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 */ // List of replica addresses for the colocation group. Replicas []string `protobuf:"bytes,3,rep,name=replicas,proto3" json:"replicas,omitempty"` // List of replica pids for the colocation group. ReplicaPids []int64 `protobuf:"varint,4,rep,packed,name=replica_pids,json=replicaPids,proto3" json:"replica_pids,omitempty"` // List of assignments for the routed components that are running in a // colocation group. Assignments map[string]*protos.Assignment `` /* 163-byte string literal not displayed */ // contains filtered or unexported fields }
func (*ColocationGroupState) Descriptor
deprecated
func (*ColocationGroupState) Descriptor() ([]byte, []int)
Deprecated: Use ColocationGroupState.ProtoReflect.Descriptor instead.
func (*ColocationGroupState) GetAssignments ¶ added in v0.1.2
func (x *ColocationGroupState) GetAssignments() map[string]*protos.Assignment
func (*ColocationGroupState) GetComponents ¶ added in v0.1.2
func (x *ColocationGroupState) GetComponents() map[string]bool
func (*ColocationGroupState) GetName ¶ added in v0.1.2
func (x *ColocationGroupState) GetName() string
func (*ColocationGroupState) GetReplicaPids ¶ added in v0.1.2
func (x *ColocationGroupState) GetReplicaPids() []int64
func (*ColocationGroupState) GetReplicas ¶ added in v0.1.2
func (x *ColocationGroupState) GetReplicas() []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