impl

package
v0.1.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (

	// BabysitterInfoKey is the name of the env variable that contains deployment
	// information for a babysitter deployed using SSH.
	BabysitterInfoKey = "SERVICEWEAVER_BABYSITTER_INFO"
)

Variables

View Source
var File_internal_tool_ssh_impl_ssh_proto protoreflect.FileDescriptor

Functions

func DefaultRegistry

func DefaultRegistry(ctx context.Context) (*status.Registry, error)

DefaultRegistry returns the default registry in $XDG_DATA_HOME/serviceweaver/ssh_registry, or ~/.local/share/serviceweaver/ssh_registry if XDG_DATA_HOME is not set.

func RunBabysitter

func RunBabysitter(ctx context.Context) error

RunBabysitter creates and runs a babysitter that was deployed using SSH.

func RunManager

func RunManager(ctx context.Context, dep *protos.Deployment, locations []string,
	logDir string) (func() error, error)

RunManager creates and runs a new manager.

Types

type BabysitterInfo

type BabysitterInfo struct {
	Deployment  *protos.Deployment      `protobuf:"bytes,1,opt,name=deployment,proto3" json:"deployment,omitempty"`
	Group       *protos.ColocationGroup `protobuf:"bytes,2,opt,name=group,proto3" json:"group,omitempty"`
	ReplicaId   int32                   `protobuf:"varint,3,opt,name=replica_id,json=replicaId,proto3" json:"replica_id,omitempty"`
	ManagerAddr string                  `protobuf:"bytes,4,opt,name=manager_addr,json=managerAddr,proto3" json:"manager_addr,omitempty"`
	LogDir      string                  `protobuf:"bytes,5,opt,name=logDir,proto3" json:"logDir,omitempty"`
	// contains filtered or unexported fields
}

BabysitterInfo contains app deployment information that is needed by a babysitter started using SSH to manage a colocation group.

func (*BabysitterInfo) Descriptor deprecated

func (*BabysitterInfo) Descriptor() ([]byte, []int)

Deprecated: Use BabysitterInfo.ProtoReflect.Descriptor instead.

func (*BabysitterInfo) GetDeployment

func (x *BabysitterInfo) GetDeployment() *protos.Deployment

func (*BabysitterInfo) GetGroup

func (x *BabysitterInfo) GetGroup() *protos.ColocationGroup

func (*BabysitterInfo) GetLogDir

func (x *BabysitterInfo) GetLogDir() string

func (*BabysitterInfo) GetManagerAddr

func (x *BabysitterInfo) GetManagerAddr() string

func (*BabysitterInfo) GetReplicaId

func (x *BabysitterInfo) GetReplicaId() int32

func (*BabysitterInfo) ProtoMessage

func (*BabysitterInfo) ProtoMessage()

func (*BabysitterInfo) ProtoReflect

func (x *BabysitterInfo) ProtoReflect() protoreflect.Message

func (*BabysitterInfo) Reset

func (x *BabysitterInfo) Reset()

func (*BabysitterInfo) String

func (x *BabysitterInfo) String() string

type BabysitterMetrics

type BabysitterMetrics struct {
	GroupName string                   `protobuf:"bytes,1,opt,name=group_name,json=groupName,proto3" json:"group_name,omitempty"`
	ReplicaId int32                    `protobuf:"varint,2,opt,name=replica_id,json=replicaId,proto3" json:"replica_id,omitempty"`
	Metrics   []*protos.MetricSnapshot `protobuf:"bytes,3,rep,name=metrics,proto3" json:"metrics,omitempty"`
	// contains filtered or unexported fields
}

BabysitterMetrics is a snapshot of a deployment's metrics as collected by a babysitter for a given colocation group.

func (*BabysitterMetrics) Descriptor deprecated

func (*BabysitterMetrics) Descriptor() ([]byte, []int)

Deprecated: Use BabysitterMetrics.ProtoReflect.Descriptor instead.

func (*BabysitterMetrics) GetGroupName

func (x *BabysitterMetrics) GetGroupName() string

func (*BabysitterMetrics) GetMetrics

func (x *BabysitterMetrics) GetMetrics() []*protos.MetricSnapshot

func (*BabysitterMetrics) GetReplicaId

func (x *BabysitterMetrics) GetReplicaId() int32

func (*BabysitterMetrics) ProtoMessage

func (*BabysitterMetrics) ProtoMessage()

func (*BabysitterMetrics) ProtoReflect

func (x *BabysitterMetrics) ProtoReflect() protoreflect.Message

func (*BabysitterMetrics) Reset

func (x *BabysitterMetrics) Reset()

func (*BabysitterMetrics) String

func (x *BabysitterMetrics) String() string

Jump to

Keyboard shortcuts

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