babysitter

package
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2023 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// The default replication factor for a component.
	DefaultReplication = 2
)

Variables

View Source
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

ExportListener implements the protos.EnvelopeHandler interface.

func (*Babysitter) GetAddress added in v0.1.2

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) Metrics

func (b *Babysitter) Metrics(ctx context.Context) (*status.Metrics, error)

Metrics implements the status.Server 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.

func (*Babysitter) Status

func (b *Babysitter) Status(ctx context.Context) (*status.Status, error)

Status implements the status.Server 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL