impl

package
v0.5.22 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 34 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, "traces.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 {
	App         *protos.AppConfig `protobuf:"bytes,1,opt,name=app,proto3" json:"app,omitempty"`
	DepId       string            `protobuf:"bytes,2,opt,name=dep_id,json=depId,proto3" json:"dep_id,omitempty"`
	Group       string            `protobuf:"bytes,3,opt,name=group,proto3" json:"group,omitempty"`
	ReplicaId   int32             `protobuf:"varint,4,opt,name=replica_id,json=replicaId,proto3" json:"replica_id,omitempty"`
	ManagerAddr string            `protobuf:"bytes,5,opt,name=manager_addr,json=managerAddr,proto3" json:"manager_addr,omitempty"`
	LogDir      string            `protobuf:"bytes,6,opt,name=logDir,proto3" json:"logDir,omitempty"`
	RunMain     bool              `protobuf:"varint,7,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) GetApp

func (x *BabysitterInfo) GetApp() *protos.AppConfig

func (*BabysitterInfo) GetDepId

func (x *BabysitterInfo) GetDepId() string

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

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

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

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

Deprecated: Use GetComponentsReply.ProtoReflect.Descriptor instead.

func (*GetComponentsReply) GetComponents

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

func (*GetComponentsReply) GetVersion

func (x *GetComponentsReply) GetVersion() string

func (*GetComponentsReply) ProtoMessage

func (*GetComponentsReply) ProtoMessage()

func (*GetComponentsReply) ProtoReflect

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

func (*GetComponentsReply) Reset

func (x *GetComponentsReply) Reset()

func (*GetComponentsReply) String

func (x *GetComponentsReply) String() string

type GetComponentsRequest

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

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

Deprecated: Use GetComponentsRequest.ProtoReflect.Descriptor instead.

func (*GetComponentsRequest) GetGroup

func (x *GetComponentsRequest) GetGroup() string

func (*GetComponentsRequest) GetVersion

func (x *GetComponentsRequest) GetVersion() string

func (*GetComponentsRequest) ProtoMessage

func (*GetComponentsRequest) ProtoMessage()

func (*GetComponentsRequest) ProtoReflect

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

func (*GetComponentsRequest) Reset

func (x *GetComponentsRequest) Reset()

func (*GetComponentsRequest) String

func (x *GetComponentsRequest) String() string

type GetRoutingInfoReply

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

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

Deprecated: Use GetRoutingInfoReply.ProtoReflect.Descriptor instead.

func (*GetRoutingInfoReply) GetRoutingInfo

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

func (*GetRoutingInfoReply) GetVersion

func (x *GetRoutingInfoReply) GetVersion() string

func (*GetRoutingInfoReply) ProtoMessage

func (*GetRoutingInfoReply) ProtoMessage()

func (*GetRoutingInfoReply) ProtoReflect

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

func (*GetRoutingInfoReply) Reset

func (x *GetRoutingInfoReply) Reset()

func (*GetRoutingInfoReply) String

func (x *GetRoutingInfoReply) String() string

type GetRoutingInfoRequest

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

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

Deprecated: Use GetRoutingInfoRequest.ProtoReflect.Descriptor instead.

func (*GetRoutingInfoRequest) GetComponent

func (x *GetRoutingInfoRequest) GetComponent() string

func (*GetRoutingInfoRequest) GetRequestingGroup

func (x *GetRoutingInfoRequest) GetRequestingGroup() string

func (*GetRoutingInfoRequest) GetRouted

func (x *GetRoutingInfoRequest) GetRouted() bool

func (*GetRoutingInfoRequest) GetVersion

func (x *GetRoutingInfoRequest) GetVersion() string

func (*GetRoutingInfoRequest) ProtoMessage

func (*GetRoutingInfoRequest) ProtoMessage()

func (*GetRoutingInfoRequest) ProtoReflect

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

func (*GetRoutingInfoRequest) Reset

func (x *GetRoutingInfoRequest) Reset()

func (*GetRoutingInfoRequest) String

func (x *GetRoutingInfoRequest) String() string

type ReplicaToRegister

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

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

Deprecated: Use ReplicaToRegister.ProtoReflect.Descriptor instead.

func (*ReplicaToRegister) GetAddress

func (x *ReplicaToRegister) GetAddress() string

func (*ReplicaToRegister) GetGroup

func (x *ReplicaToRegister) GetGroup() string

func (*ReplicaToRegister) GetPid

func (x *ReplicaToRegister) GetPid() int64

func (*ReplicaToRegister) ProtoMessage

func (*ReplicaToRegister) ProtoMessage()

func (*ReplicaToRegister) ProtoReflect

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

func (*ReplicaToRegister) Reset

func (x *ReplicaToRegister) Reset()

func (*ReplicaToRegister) String

func (x *ReplicaToRegister) String() string

type SshConfig

type SshConfig struct {

	// Information about the application deployment.
	App       *protos.AppConfig                     `protobuf:"bytes,1,opt,name=app,proto3" json:"app,omitempty"`
	DepId     string                                `protobuf:"bytes,2,opt,name=dep_id,json=depId,proto3" json:"dep_id,omitempty"`
	Listeners map[string]*SshConfig_ListenerOptions `` /* 159-byte string literal not displayed */
	// File that contains the IP addresses of all locations where the application
	// can run.
	Locations string `protobuf:"bytes,4,opt,name=locations,proto3" json:"locations,omitempty"`
	// 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

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

Deprecated: Use SshConfig.ProtoReflect.Descriptor instead.

func (*SshConfig) GetApp

func (x *SshConfig) GetApp() *protos.AppConfig

func (*SshConfig) GetDepId

func (x *SshConfig) GetDepId() string

func (*SshConfig) GetListeners

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

func (*SshConfig) GetLocations

func (x *SshConfig) GetLocations() string

func (*SshConfig) ProtoMessage

func (*SshConfig) ProtoMessage()

func (*SshConfig) ProtoReflect

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

func (*SshConfig) Reset

func (x *SshConfig) Reset()

func (*SshConfig) String

func (x *SshConfig) String() string

type SshConfig_ListenerOptions

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

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

Deprecated: Use SshConfig_ListenerOptions.ProtoReflect.Descriptor instead.

func (*SshConfig_ListenerOptions) GetAddress

func (x *SshConfig_ListenerOptions) GetAddress() string

func (*SshConfig_ListenerOptions) ProtoMessage

func (*SshConfig_ListenerOptions) ProtoMessage()

func (*SshConfig_ListenerOptions) ProtoReflect

func (*SshConfig_ListenerOptions) Reset

func (x *SshConfig_ListenerOptions) Reset()

func (*SshConfig_ListenerOptions) String

func (x *SshConfig_ListenerOptions) String() string

Jump to

Keyboard shortcuts

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