impl

package
v0.15.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// The directories and files where "weaver ssh" stores data.
	//
	// TODO(mwhittaker): Take these as arguments and move them to ssh.go.
	LogDir = filepath.Join(runtime.LogsDir(), "ssh")

	PerfettoFile = filepath.Join(dataDir, "perfetto.db")
)
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 an envelope.Envelope and a metrics collector for a weavelet deployed with SSH.

func RunManager

func RunManager(ctx context.Context, config *SshConfig, locations map[string]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       string             `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"`
	RunMain     bool               `protobuf:"varint,6,opt,name=run_main,json=runMain,proto3" json:"run_main,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() string

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) GetRunMain added in v0.2.0

func (x *BabysitterInfo) GetRunMain() bool

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

type GetComponentsReply added in v0.2.0

type GetComponentsReply struct {
	Components []string `protobuf:"bytes,1,rep,name=components,proto3" json:"components,omitempty"`
	Version    string   `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

func (*GetComponentsReply) Descriptor deprecated added in v0.2.0

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

Deprecated: Use GetComponentsReply.ProtoReflect.Descriptor instead.

func (*GetComponentsReply) GetComponents added in v0.2.0

func (x *GetComponentsReply) GetComponents() []string

func (*GetComponentsReply) GetVersion added in v0.2.0

func (x *GetComponentsReply) GetVersion() string

func (*GetComponentsReply) ProtoMessage added in v0.2.0

func (*GetComponentsReply) ProtoMessage()

func (*GetComponentsReply) ProtoReflect added in v0.2.0

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

func (*GetComponentsReply) Reset added in v0.2.0

func (x *GetComponentsReply) Reset()

func (*GetComponentsReply) String added in v0.2.0

func (x *GetComponentsReply) String() string

type GetComponentsRequest added in v0.2.0

type GetComponentsRequest struct {
	Group   string `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"`
	Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

A request from the babysitter to the manager to get the latest set of components to run.

func (*GetComponentsRequest) Descriptor deprecated added in v0.2.0

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

Deprecated: Use GetComponentsRequest.ProtoReflect.Descriptor instead.

func (*GetComponentsRequest) GetGroup added in v0.2.0

func (x *GetComponentsRequest) GetGroup() string

func (*GetComponentsRequest) GetVersion added in v0.2.0

func (x *GetComponentsRequest) GetVersion() string

func (*GetComponentsRequest) ProtoMessage added in v0.2.0

func (*GetComponentsRequest) ProtoMessage()

func (*GetComponentsRequest) ProtoReflect added in v0.2.0

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

func (*GetComponentsRequest) Reset added in v0.2.0

func (x *GetComponentsRequest) Reset()

func (*GetComponentsRequest) String added in v0.2.0

func (x *GetComponentsRequest) String() string

type GetRoutingInfoReply added in v0.2.0

type GetRoutingInfoReply struct {
	RoutingInfo *protos.RoutingInfo `protobuf:"bytes,1,opt,name=routing_info,json=routingInfo,proto3" json:"routing_info,omitempty"`
	Version     string              `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

func (*GetRoutingInfoReply) Descriptor deprecated added in v0.2.0

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

Deprecated: Use GetRoutingInfoReply.ProtoReflect.Descriptor instead.

func (*GetRoutingInfoReply) GetRoutingInfo added in v0.2.0

func (x *GetRoutingInfoReply) GetRoutingInfo() *protos.RoutingInfo

func (*GetRoutingInfoReply) GetVersion added in v0.2.0

func (x *GetRoutingInfoReply) GetVersion() string

func (*GetRoutingInfoReply) ProtoMessage added in v0.2.0

func (*GetRoutingInfoReply) ProtoMessage()

func (*GetRoutingInfoReply) ProtoReflect added in v0.2.0

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

func (*GetRoutingInfoReply) Reset added in v0.2.0

func (x *GetRoutingInfoReply) Reset()

func (*GetRoutingInfoReply) String added in v0.2.0

func (x *GetRoutingInfoReply) String() string

type GetRoutingInfoRequest added in v0.2.0

type GetRoutingInfoRequest struct {

	// Note that requesting group is the group requesting the routing info, not
	// the group of the component.
	RequestingGroup string `protobuf:"bytes,1,opt,name=requesting_group,json=requestingGroup,proto3" json:"requesting_group,omitempty"`
	Component       string `protobuf:"bytes,2,opt,name=component,proto3" json:"component,omitempty"`
	Routed          bool   `protobuf:"varint,3,opt,name=routed,proto3" json:"routed,omitempty"` // is the component routed?
	Version         string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

A request from the babysitter to the manager to get the latest routing info for a component.

func (*GetRoutingInfoRequest) Descriptor deprecated added in v0.2.0

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

Deprecated: Use GetRoutingInfoRequest.ProtoReflect.Descriptor instead.

func (*GetRoutingInfoRequest) GetComponent added in v0.2.0

func (x *GetRoutingInfoRequest) GetComponent() string

func (*GetRoutingInfoRequest) GetRequestingGroup added in v0.2.0

func (x *GetRoutingInfoRequest) GetRequestingGroup() string

func (*GetRoutingInfoRequest) GetRouted added in v0.2.0

func (x *GetRoutingInfoRequest) GetRouted() bool

func (*GetRoutingInfoRequest) GetVersion added in v0.2.0

func (x *GetRoutingInfoRequest) GetVersion() string

func (*GetRoutingInfoRequest) ProtoMessage added in v0.2.0

func (*GetRoutingInfoRequest) ProtoMessage()

func (*GetRoutingInfoRequest) ProtoReflect added in v0.2.0

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

func (*GetRoutingInfoRequest) Reset added in v0.2.0

func (x *GetRoutingInfoRequest) Reset()

func (*GetRoutingInfoRequest) String added in v0.2.0

func (x *GetRoutingInfoRequest) String() string

type ReplicaToRegister added in v0.2.0

type ReplicaToRegister struct {
	Group   string `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"`
	Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` // Replica internal address.
	Pid     int64  `protobuf:"varint,3,opt,name=pid,proto3" json:"pid,omitempty"`        // Replica pid.
	// contains filtered or unexported fields
}

ReplicaToRegister is a request to the manager to register a replica of a given colocation group (i.e., a weavelet).

func (*ReplicaToRegister) Descriptor deprecated added in v0.2.0

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

Deprecated: Use ReplicaToRegister.ProtoReflect.Descriptor instead.

func (*ReplicaToRegister) GetAddress added in v0.2.0

func (x *ReplicaToRegister) GetAddress() string

func (*ReplicaToRegister) GetGroup added in v0.2.0

func (x *ReplicaToRegister) GetGroup() string

func (*ReplicaToRegister) GetPid added in v0.2.0

func (x *ReplicaToRegister) GetPid() int64

func (*ReplicaToRegister) ProtoMessage added in v0.2.0

func (*ReplicaToRegister) ProtoMessage()

func (*ReplicaToRegister) ProtoReflect added in v0.2.0

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

func (*ReplicaToRegister) Reset added in v0.2.0

func (x *ReplicaToRegister) Reset()

func (*ReplicaToRegister) String added in v0.2.0

func (x *ReplicaToRegister) String() string

type SshConfig added in v0.15.0

type SshConfig struct {

	// Information about the application deployment.
	Deployment      *protos.Deployment                    `protobuf:"bytes,1,opt,name=deployment,proto3" json:"deployment,omitempty"`
	ListenerOptions map[string]*SshConfig_ListenerOptions `` /* 194-byte string literal not displayed */
	// contains filtered or unexported fields
}

SshConfig stores the configuration information for one execution of a Service Weaver application using the SSH deployer.

func (*SshConfig) Descriptor deprecated added in v0.15.0

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

Deprecated: Use SshConfig.ProtoReflect.Descriptor instead.

func (*SshConfig) GetDeployment added in v0.15.0

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

func (*SshConfig) GetListenerOptions added in v0.15.0

func (x *SshConfig) GetListenerOptions() map[string]*SshConfig_ListenerOptions

func (*SshConfig) ProtoMessage added in v0.15.0

func (*SshConfig) ProtoMessage()

func (*SshConfig) ProtoReflect added in v0.15.0

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

func (*SshConfig) Reset added in v0.15.0

func (x *SshConfig) Reset()

func (*SshConfig) String added in v0.15.0

func (x *SshConfig) String() string

type SshConfig_ListenerOptions added in v0.15.0

type SshConfig_ListenerOptions struct {

	// Address of the listener. The value must have the form :port or
	// host:port, or it may be the empty string, which is treated as ":0".
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// contains filtered or unexported fields
}

Options for the application listeners, keyed by listener name. If a listener isn't specified in the map, default options will be used.

func (*SshConfig_ListenerOptions) Descriptor deprecated added in v0.15.0

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

Deprecated: Use SshConfig_ListenerOptions.ProtoReflect.Descriptor instead.

func (*SshConfig_ListenerOptions) GetAddress added in v0.15.0

func (x *SshConfig_ListenerOptions) GetAddress() string

func (*SshConfig_ListenerOptions) ProtoMessage added in v0.15.0

func (*SshConfig_ListenerOptions) ProtoMessage()

func (*SshConfig_ListenerOptions) ProtoReflect added in v0.15.0

func (*SshConfig_ListenerOptions) Reset added in v0.15.0

func (x *SshConfig_ListenerOptions) Reset()

func (*SshConfig_ListenerOptions) String added in v0.15.0

func (x *SshConfig_ListenerOptions) String() string

Jump to

Keyboard shortcuts

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