proto

package
v0.0.0-...-3bfe646 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: Apache-2.0 Imports: 13 Imported by: 8

Documentation

Index

Constants

View Source
const (
	CA         = "ca"
	Client     = "client"
	Server     = "server"
	Key        = "key"
	Cert       = "cert"
	ServerName = "gravity-agent"
)

defines expected file names in package

Variables

View Source
var ExecOutput_FD_name = map[int32]string{
	0: "STDOUT",
	1: "STDERR",
}
View Source
var ExecOutput_FD_value = map[string]int32{
	"STDOUT": 0,
	"STDERR": 1,
}
View Source
var LogEntry_Level_name = map[int32]string{
	0: "Debug",
	1: "Info",
	2: "Warn",
	3: "Error",
}
View Source
var LogEntry_Level_value = map[string]int32{
	"Debug": 0,
	"Info":  1,
	"Warn":  2,
	"Error": 3,
}

Functions

func MountFromProto

func MountFromProto(mount *Mount) storage.Mount

MountFromProto converts mount from protobuf format

func MountsFromProto

func MountsFromProto(mounts []*Mount) []storage.Mount

MountsFromProto converts list of mounts from protobuf format

func RegisterAgentServer

func RegisterAgentServer(s *grpc.Server, srv AgentServer)

func RegisterDiscoveryServer

func RegisterDiscoveryServer(s *grpc.Server, srv DiscoveryServer)

Types

type AgentClient

type AgentClient interface {
	// Shutdown requests the agent to shut down
	Shutdown(ctx context.Context, in *ShutdownRequest, opts ...grpc.CallOption) (*types.Empty, error)
	// Abort requests the agent to clean up the state on this node and shut down
	Abort(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*types.Empty, error)
	// Command executes a command specified with CommandArgs.
	// The output of the command is streamed as a result.
	Command(ctx context.Context, in *CommandArgs, opts ...grpc.CallOption) (Agent_CommandClient, error)
	// PeerJoin receives a connection from a peer.
	// The peer configuration allows this agent to establish a reverse
	// connection to the remote peer to execute remote commands
	PeerJoin(ctx context.Context, in *PeerJoinRequest, opts ...grpc.CallOption) (*types.Empty, error)
	// PeerLeave receives a "leave" request from a peer and initiates its shutdown
	PeerLeave(ctx context.Context, in *PeerLeaveRequest, opts ...grpc.CallOption) (*types.Empty, error)
}

AgentClient is the client API for Agent service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewAgentClient

func NewAgentClient(cc *grpc.ClientConn) AgentClient

type AgentServer

type AgentServer interface {
	// Shutdown requests the agent to shut down
	Shutdown(context.Context, *ShutdownRequest) (*types.Empty, error)
	// Abort requests the agent to clean up the state on this node and shut down
	Abort(context.Context, *types.Empty) (*types.Empty, error)
	// Command executes a command specified with CommandArgs.
	// The output of the command is streamed as a result.
	Command(*CommandArgs, Agent_CommandServer) error
	// PeerJoin receives a connection from a peer.
	// The peer configuration allows this agent to establish a reverse
	// connection to the remote peer to execute remote commands
	PeerJoin(context.Context, *PeerJoinRequest) (*types.Empty, error)
	// PeerLeave receives a "leave" request from a peer and initiates its shutdown
	PeerLeave(context.Context, *PeerLeaveRequest) (*types.Empty, error)
}

AgentServer is the server API for Agent service.

type Agent_CommandClient

type Agent_CommandClient interface {
	Recv() (*Message, error)
	grpc.ClientStream
}

type Agent_CommandServer

type Agent_CommandServer interface {
	Send(*Message) error
	grpc.ServerStream
}

type CloudMetadata

type CloudMetadata struct {
	// NodeName specifies the optional node name override.
	// Can be specified either on command line or derived from cloud environment.
	NodeName string `protobuf:"bytes,1,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"`
	// InstanceType specifies the type of the instance running
	InstanceType string `protobuf:"bytes,2,opt,name=instance_type,json=instanceType,proto3" json:"instance_type,omitempty"`
	// InstanceID provides the cloud-specific instance ID
	InstanceId           string   `protobuf:"bytes,3,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

CloudMetadata describes the instance in the cloud

func (*CloudMetadata) Descriptor

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

func (*CloudMetadata) GetInstanceId

func (m *CloudMetadata) GetInstanceId() string

func (*CloudMetadata) GetInstanceType

func (m *CloudMetadata) GetInstanceType() string

func (*CloudMetadata) GetNodeName

func (m *CloudMetadata) GetNodeName() string

func (*CloudMetadata) ProtoMessage

func (*CloudMetadata) ProtoMessage()

func (*CloudMetadata) Reset

func (m *CloudMetadata) Reset()

func (*CloudMetadata) String

func (r *CloudMetadata) String() string

String describes this metadata object as text

func (*CloudMetadata) XXX_DiscardUnknown

func (m *CloudMetadata) XXX_DiscardUnknown()

func (*CloudMetadata) XXX_Marshal

func (m *CloudMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CloudMetadata) XXX_Merge

func (m *CloudMetadata) XXX_Merge(src proto.Message)

func (*CloudMetadata) XXX_Size

func (m *CloudMetadata) XXX_Size() int

func (*CloudMetadata) XXX_Unmarshal

func (m *CloudMetadata) XXX_Unmarshal(b []byte) error

type CommandArgs

type CommandArgs struct {
	// Args specify the command to run
	Args []string `protobuf:"bytes,1,rep,name=args,proto3" json:"args,omitempty"`
	// SelfCommand specifies whether the agent's binary
	// should execute the command given with args
	SelfCommand bool `protobuf:"varint,2,opt,name=self_command,json=selfCommand,proto3" json:"self_command,omitempty"`
	// Env sets the environment for the command
	Env map[string]string `` /* 147-byte string literal not displayed */
	// WorkingDir specifies the working directory for the process
	WorkingDir           string   `protobuf:"bytes,4,opt,name=working_dir,json=workingDir,proto3" json:"working_dir,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

CommandArgs defines the command execution configuration

func (*CommandArgs) Descriptor

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

func (*CommandArgs) GetArgs

func (m *CommandArgs) GetArgs() []string

func (*CommandArgs) GetEnv

func (m *CommandArgs) GetEnv() map[string]string

func (*CommandArgs) GetSelfCommand

func (m *CommandArgs) GetSelfCommand() bool

func (*CommandArgs) GetWorkingDir

func (m *CommandArgs) GetWorkingDir() string

func (*CommandArgs) ProtoMessage

func (*CommandArgs) ProtoMessage()

func (*CommandArgs) Reset

func (m *CommandArgs) Reset()

func (*CommandArgs) String

func (m *CommandArgs) String() string

func (*CommandArgs) XXX_DiscardUnknown

func (m *CommandArgs) XXX_DiscardUnknown()

func (*CommandArgs) XXX_Marshal

func (m *CommandArgs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CommandArgs) XXX_Merge

func (m *CommandArgs) XXX_Merge(src proto.Message)

func (*CommandArgs) XXX_Size

func (m *CommandArgs) XXX_Size() int

func (*CommandArgs) XXX_Unmarshal

func (m *CommandArgs) XXX_Unmarshal(b []byte) error

type Device

type Device struct {
	// Name identifies the device
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Device is a system I/O device

func (*Device) Descriptor

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

func (*Device) GetName

func (m *Device) GetName() string

func (*Device) ProtoMessage

func (*Device) ProtoMessage()

func (*Device) Reset

func (m *Device) Reset()

func (*Device) String

func (m *Device) String() string

func (*Device) XXX_DiscardUnknown

func (m *Device) XXX_DiscardUnknown()

func (*Device) XXX_Marshal

func (m *Device) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Device) XXX_Merge

func (m *Device) XXX_Merge(src proto.Message)

func (*Device) XXX_Size

func (m *Device) XXX_Size() int

func (*Device) XXX_Unmarshal

func (m *Device) XXX_Unmarshal(b []byte) error

type DiscoveryClient

type DiscoveryClient interface {
	// GetRuntimeConfig returns the agent's runtime configuration
	GetRuntimeConfig(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*RuntimeConfig, error)
	// GetSystemInfo queries system information on the host the agent is running on
	GetSystemInfo(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*SystemInfo, error)
	// GetCurrentTime returns the node's current time as UTC timestamp
	GetCurrentTime(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*types.Timestamp, error)
	// GetVersion returns the agent's version information.
	GetVersion(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*Version, error)
}

DiscoveryClient is the client API for Discovery service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewDiscoveryClient

func NewDiscoveryClient(cc *grpc.ClientConn) DiscoveryClient

type DiscoveryServer

type DiscoveryServer interface {
	// GetRuntimeConfig returns the agent's runtime configuration
	GetRuntimeConfig(context.Context, *types.Empty) (*RuntimeConfig, error)
	// GetSystemInfo queries system information on the host the agent is running on
	GetSystemInfo(context.Context, *types.Empty) (*SystemInfo, error)
	// GetCurrentTime returns the node's current time as UTC timestamp
	GetCurrentTime(context.Context, *types.Empty) (*types.Timestamp, error)
	// GetVersion returns the agent's version information.
	GetVersion(context.Context, *types.Empty) (*Version, error)
}

DiscoveryServer is the server API for Discovery service.

type Error

type Error struct {
	// Messages specifies the error message
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// Traces lists stack traces
	Traces               []string `protobuf:"bytes,2,rep,name=traces,proto3" json:"traces,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Error encapsulates error stack

func EncodeError

func EncodeError(err error) *Error

EncodeError converts error err to protobuf wire-friendly format

func (*Error) Descriptor

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

func (*Error) GetMessage

func (m *Error) GetMessage() string

func (*Error) GetTraces

func (m *Error) GetTraces() []string

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) Reset

func (m *Error) Reset()

func (*Error) String

func (m *Error) String() string

func (*Error) XXX_DiscardUnknown

func (m *Error) XXX_DiscardUnknown()

func (*Error) XXX_Marshal

func (m *Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Error) XXX_Merge

func (m *Error) XXX_Merge(src proto.Message)

func (*Error) XXX_Size

func (m *Error) XXX_Size() int

func (*Error) XXX_Unmarshal

func (m *Error) XXX_Unmarshal(b []byte) error

type ExecCompleted

type ExecCompleted struct {
	// Seq specifies the command ID. Unique only in the current call scope
	Seq int32 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"`
	// ExitCode is the exit code command exited with
	ExitCode int32 `protobuf:"varint,2,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"`
	// Error specifies the command execution error
	Error                *Error   `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

ExecComplete is sent when command completes

func (*ExecCompleted) Descriptor

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

func (*ExecCompleted) GetError

func (m *ExecCompleted) GetError() *Error

func (*ExecCompleted) GetExitCode

func (m *ExecCompleted) GetExitCode() int32

func (*ExecCompleted) GetSeq

func (m *ExecCompleted) GetSeq() int32

func (*ExecCompleted) ProtoMessage

func (*ExecCompleted) ProtoMessage()

func (*ExecCompleted) Reset

func (m *ExecCompleted) Reset()

func (*ExecCompleted) String

func (m *ExecCompleted) String() string

func (*ExecCompleted) XXX_DiscardUnknown

func (m *ExecCompleted) XXX_DiscardUnknown()

func (*ExecCompleted) XXX_Marshal

func (m *ExecCompleted) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ExecCompleted) XXX_Merge

func (m *ExecCompleted) XXX_Merge(src proto.Message)

func (*ExecCompleted) XXX_Size

func (m *ExecCompleted) XXX_Size() int

func (*ExecCompleted) XXX_Unmarshal

func (m *ExecCompleted) XXX_Unmarshal(b []byte) error

type ExecOutput

type ExecOutput struct {
	Seq                  int32         `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"`
	Fd                   ExecOutput_FD `protobuf:"varint,2,opt,name=fd,proto3,enum=proto.ExecOutput_FD" json:"fd,omitempty"`
	Data                 []byte        `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

ExecOutput represents output of a running command

func (*ExecOutput) Descriptor

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

func (*ExecOutput) GetData

func (m *ExecOutput) GetData() []byte

func (*ExecOutput) GetFd

func (m *ExecOutput) GetFd() ExecOutput_FD

func (*ExecOutput) GetSeq

func (m *ExecOutput) GetSeq() int32

func (*ExecOutput) ProtoMessage

func (*ExecOutput) ProtoMessage()

func (*ExecOutput) Reset

func (m *ExecOutput) Reset()

func (*ExecOutput) String

func (m *ExecOutput) String() string

func (*ExecOutput) XXX_DiscardUnknown

func (m *ExecOutput) XXX_DiscardUnknown()

func (*ExecOutput) XXX_Marshal

func (m *ExecOutput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ExecOutput) XXX_Merge

func (m *ExecOutput) XXX_Merge(src proto.Message)

func (*ExecOutput) XXX_Size

func (m *ExecOutput) XXX_Size() int

func (*ExecOutput) XXX_Unmarshal

func (m *ExecOutput) XXX_Unmarshal(b []byte) error

type ExecOutput_FD

type ExecOutput_FD int32
const (
	ExecOutput_STDOUT ExecOutput_FD = 0
	ExecOutput_STDERR ExecOutput_FD = 1
)

func (ExecOutput_FD) EnumDescriptor

func (ExecOutput_FD) EnumDescriptor() ([]byte, []int)

func (ExecOutput_FD) String

func (x ExecOutput_FD) String() string

type ExecStarted

type ExecStarted struct {
	// Seq specifies the command ID. Unique only in the current call scope
	Seq int32 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"`
	// Args describes the running command
	Args []string `protobuf:"bytes,2,rep,name=args,proto3" json:"args,omitempty"`
	// Env defines the environment of the running command
	Env                  []string `protobuf:"bytes,3,rep,name=env,proto3" json:"env,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

ExecStarted is sent when local command starts to execute

func (*ExecStarted) Descriptor

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

func (*ExecStarted) GetArgs

func (m *ExecStarted) GetArgs() []string

func (*ExecStarted) GetEnv

func (m *ExecStarted) GetEnv() []string

func (*ExecStarted) GetSeq

func (m *ExecStarted) GetSeq() int32

func (*ExecStarted) ProtoMessage

func (*ExecStarted) ProtoMessage()

func (*ExecStarted) Reset

func (m *ExecStarted) Reset()

func (*ExecStarted) String

func (m *ExecStarted) String() string

func (*ExecStarted) XXX_DiscardUnknown

func (m *ExecStarted) XXX_DiscardUnknown()

func (*ExecStarted) XXX_Marshal

func (m *ExecStarted) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ExecStarted) XXX_Merge

func (m *ExecStarted) XXX_Merge(src proto.Message)

func (*ExecStarted) XXX_Size

func (m *ExecStarted) XXX_Size() int

func (*ExecStarted) XXX_Unmarshal

func (m *ExecStarted) XXX_Unmarshal(b []byte) error

type IncomingMessageStream

type IncomingMessageStream interface {
	// Recv receives a message from the stream.
	// Blocks until the message is received
	Recv() (*Message, error)
}

IncomingMessageStream defines an incoming message stream

type LogEntry

type LogEntry struct {
	Message              string            `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	Fields               map[string]string `` /* 153-byte string literal not displayed */
	Level                LogEntry_Level    `protobuf:"varint,3,opt,name=level,proto3,enum=proto.LogEntry_Level" json:"level,omitempty"`
	Traces               []string          `protobuf:"bytes,4,rep,name=traces,proto3" json:"traces,omitempty"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*LogEntry) Descriptor

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

func (*LogEntry) GetFields

func (m *LogEntry) GetFields() map[string]string

func (*LogEntry) GetLevel

func (m *LogEntry) GetLevel() LogEntry_Level

func (*LogEntry) GetMessage

func (m *LogEntry) GetMessage() string

func (*LogEntry) GetTraces

func (m *LogEntry) GetTraces() []string

func (*LogEntry) ProtoMessage

func (*LogEntry) ProtoMessage()

func (*LogEntry) Reset

func (m *LogEntry) Reset()

func (*LogEntry) String

func (m *LogEntry) String() string

func (*LogEntry) XXX_DiscardUnknown

func (m *LogEntry) XXX_DiscardUnknown()

func (*LogEntry) XXX_Marshal

func (m *LogEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LogEntry) XXX_Merge

func (m *LogEntry) XXX_Merge(src proto.Message)

func (*LogEntry) XXX_Size

func (m *LogEntry) XXX_Size() int

func (*LogEntry) XXX_Unmarshal

func (m *LogEntry) XXX_Unmarshal(b []byte) error

type LogEntry_Level

type LogEntry_Level int32
const (
	LogEntry_Debug LogEntry_Level = 0
	LogEntry_Info  LogEntry_Level = 1
	LogEntry_Warn  LogEntry_Level = 2
	LogEntry_Error LogEntry_Level = 3
)

func (LogEntry_Level) EnumDescriptor

func (LogEntry_Level) EnumDescriptor() ([]byte, []int)

func (LogEntry_Level) String

func (x LogEntry_Level) String() string

type Message

type Message struct {
	// Types that are valid to be assigned to Element:
	//	*Message_ExecStarted
	//	*Message_ExecCompleted
	//	*Message_ExecOutput
	//	*Message_LogEntry
	//	*Message_Error
	Element              isMessage_Element `protobuf_oneof:"element"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

Message is a union of various subtypes of event stream

func ErrorToMessage

func ErrorToMessage(err error) *Message

ErrorToMessage returns a new message using the specified error

func (*Message) Descriptor

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

func (*Message) GetElement

func (m *Message) GetElement() isMessage_Element

func (*Message) GetError

func (m *Message) GetError() *Error

func (*Message) GetExecCompleted

func (m *Message) GetExecCompleted() *ExecCompleted

func (*Message) GetExecOutput

func (m *Message) GetExecOutput() *ExecOutput

func (*Message) GetExecStarted

func (m *Message) GetExecStarted() *ExecStarted

func (*Message) GetLogEntry

func (m *Message) GetLogEntry() *LogEntry

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) Reset

func (m *Message) Reset()

func (*Message) String

func (m *Message) String() string

func (*Message) XXX_DiscardUnknown

func (m *Message) XXX_DiscardUnknown()

func (*Message) XXX_Marshal

func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Message) XXX_Merge

func (m *Message) XXX_Merge(src proto.Message)

func (*Message) XXX_OneofWrappers

func (*Message) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*Message) XXX_Size

func (m *Message) XXX_Size() int

func (*Message) XXX_Unmarshal

func (m *Message) XXX_Unmarshal(b []byte) error

type Message_Error

type Message_Error struct {
	Error *Error `protobuf:"bytes,5,opt,name=error,proto3,oneof"`
}

type Message_ExecCompleted

type Message_ExecCompleted struct {
	ExecCompleted *ExecCompleted `protobuf:"bytes,2,opt,name=exec_completed,json=execCompleted,proto3,oneof"`
}

type Message_ExecOutput

type Message_ExecOutput struct {
	ExecOutput *ExecOutput `protobuf:"bytes,3,opt,name=exec_output,json=execOutput,proto3,oneof"`
}

type Message_ExecStarted

type Message_ExecStarted struct {
	ExecStarted *ExecStarted `protobuf:"bytes,1,opt,name=exec_started,json=execStarted,proto3,oneof"`
}

type Message_LogEntry

type Message_LogEntry struct {
	LogEntry *LogEntry `protobuf:"bytes,4,opt,name=log_entry,json=logEntry,proto3,oneof"`
}

type Mount

type Mount struct {
	// Name identifies the mount point
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Source specifies the source directory
	Source               string   `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Mount is mount point

func MountToProto

func MountToProto(mount storage.Mount) *Mount

MountToProto converts mount to protobuf format

func MountsToProto

func MountsToProto(mounts []storage.Mount) []*Mount

MountsToProto converts list of mounts to protobuf format

func (*Mount) Descriptor

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

func (*Mount) GetName

func (m *Mount) GetName() string

func (*Mount) GetSource

func (m *Mount) GetSource() string

func (*Mount) ProtoMessage

func (*Mount) ProtoMessage()

func (*Mount) Reset

func (m *Mount) Reset()

func (Mount) String

func (r Mount) String() string

String describes this mount point as text

func (*Mount) XXX_DiscardUnknown

func (m *Mount) XXX_DiscardUnknown()

func (*Mount) XXX_Marshal

func (m *Mount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Mount) XXX_Merge

func (m *Mount) XXX_Merge(src proto.Message)

func (*Mount) XXX_Size

func (m *Mount) XXX_Size() int

func (*Mount) XXX_Unmarshal

func (m *Mount) XXX_Unmarshal(b []byte) error

type OutgoingMessageStream

type OutgoingMessageStream interface {
	// Send sends a message to the stream.
	Send(*Message) error
	// Context returns context associated with the stream
	Context() context.Context
}

OutgoingMessageStream defines an outgoing message stream. The stream is used to dispatch progress events and raw command output during command execution

type PeerJoinRequest

type PeerJoinRequest struct {
	// Addr is the peer address as host:port
	Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`
	// Config specifies the peer's runtime configuration
	Config *RuntimeConfig `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
	// SystemInfo describes the peer's environment
	SystemInfo           []byte   `protobuf:"bytes,3,opt,name=system_info,json=systemInfo,proto3" json:"system_info,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

PeerJoinRequest is request to join from a remote peer.

func (*PeerJoinRequest) Descriptor

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

func (*PeerJoinRequest) GetAddr

func (m *PeerJoinRequest) GetAddr() string

func (*PeerJoinRequest) GetConfig

func (m *PeerJoinRequest) GetConfig() *RuntimeConfig

func (*PeerJoinRequest) GetSystemInfo

func (m *PeerJoinRequest) GetSystemInfo() []byte

func (*PeerJoinRequest) ProtoMessage

func (*PeerJoinRequest) ProtoMessage()

func (*PeerJoinRequest) Reset

func (m *PeerJoinRequest) Reset()

func (*PeerJoinRequest) String

func (r *PeerJoinRequest) String() string

String describes this request as text

func (*PeerJoinRequest) XXX_DiscardUnknown

func (m *PeerJoinRequest) XXX_DiscardUnknown()

func (*PeerJoinRequest) XXX_Marshal

func (m *PeerJoinRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PeerJoinRequest) XXX_Merge

func (m *PeerJoinRequest) XXX_Merge(src proto.Message)

func (*PeerJoinRequest) XXX_Size

func (m *PeerJoinRequest) XXX_Size() int

func (*PeerJoinRequest) XXX_Unmarshal

func (m *PeerJoinRequest) XXX_Unmarshal(b []byte) error

type PeerLeaveRequest

type PeerLeaveRequest struct {
	// Addr is the peer address as host:port
	Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`
	// Config specifies the peer's runtime configuration
	Config *RuntimeConfig `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
	// SystemInfo describes the peer's environment
	SystemInfo           []byte   `protobuf:"bytes,3,opt,name=system_info,json=systemInfo,proto3" json:"system_info,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

PeerLeaveRequest is a request a peer sends when it wants to leave the cluster

func (*PeerLeaveRequest) Descriptor

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

func (*PeerLeaveRequest) GetAddr

func (m *PeerLeaveRequest) GetAddr() string

func (*PeerLeaveRequest) GetConfig

func (m *PeerLeaveRequest) GetConfig() *RuntimeConfig

func (*PeerLeaveRequest) GetSystemInfo

func (m *PeerLeaveRequest) GetSystemInfo() []byte

func (*PeerLeaveRequest) ProtoMessage

func (*PeerLeaveRequest) ProtoMessage()

func (*PeerLeaveRequest) Reset

func (m *PeerLeaveRequest) Reset()

func (*PeerLeaveRequest) String

func (r *PeerLeaveRequest) String() string

String describes this request as text

func (*PeerLeaveRequest) XXX_DiscardUnknown

func (m *PeerLeaveRequest) XXX_DiscardUnknown()

func (*PeerLeaveRequest) XXX_Marshal

func (m *PeerLeaveRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PeerLeaveRequest) XXX_Merge

func (m *PeerLeaveRequest) XXX_Merge(src proto.Message)

func (*PeerLeaveRequest) XXX_Size

func (m *PeerLeaveRequest) XXX_Size() int

func (*PeerLeaveRequest) XXX_Unmarshal

func (m *PeerLeaveRequest) XXX_Unmarshal(b []byte) error

type RuntimeConfig

type RuntimeConfig struct {
	// Role specifies the agent's role
	Role string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"`
	// AdvertiseAddr specifies the address the agent is listening on
	AdvertiseAddr string `protobuf:"bytes,2,opt,name=advertise_addr,json=advertiseAddr,proto3" json:"advertise_addr,omitempty"`
	// SystemDevice defines the device to use to setup telekube state directory
	SystemDevice string `protobuf:"bytes,4,opt,name=system_device,json=systemDevice,proto3" json:"system_device,omitempty"`
	// Mounts lists mount overrides
	Mounts []*Mount `protobuf:"bytes,5,rep,name=mounts,proto3" json:"mounts,omitempty"`
	// StateDir specifies the location of the telekube system state directory
	StateDir string `protobuf:"bytes,6,opt,name=state_dir,json=stateDir,proto3" json:"state_dir,omitempty"`
	// TODO: TempDir specifies the location of the temporary directory. It is part of the runtime
	// configuration as it can potentially become local to system directory - independent of OS
	TempDir string `protobuf:"bytes,7,opt,name=temp_dir,json=tempDir,proto3" json:"temp_dir,omitempty"`
	// Token authorizes the peer to join an operation.
	Token string `protobuf:"bytes,8,opt,name=token,proto3" json:"token,omitempty"`
	// CloudMetadata describes the instance from the cloud environment.
	// Optional, only set when running on a supported cloud
	CloudMetadata *CloudMetadata `protobuf:"bytes,9,opt,name=cloud_metadata,json=cloudMetadata,proto3" json:"cloud_metadata,omitempty"`
	// KeyValues specifies additional runtime configuration parameters
	// as key=value pairs
	KeyValues map[string]string `` /* 177-byte string literal not displayed */
	// SELinux indicates that the node has SELinux support on
	SELinux              bool     `protobuf:"varint,11,opt,name=selinux,proto3" json:"selinux,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

RuntimeConfig decribes agent's runtime configuration

func (*RuntimeConfig) Descriptor

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

func (*RuntimeConfig) GetAdvertiseAddr

func (m *RuntimeConfig) GetAdvertiseAddr() string

func (*RuntimeConfig) GetCloudMetadata

func (m *RuntimeConfig) GetCloudMetadata() *CloudMetadata

func (*RuntimeConfig) GetKeyValues

func (m *RuntimeConfig) GetKeyValues() map[string]string

func (*RuntimeConfig) GetMounts

func (m *RuntimeConfig) GetMounts() []*Mount

func (*RuntimeConfig) GetRole

func (m *RuntimeConfig) GetRole() string

func (*RuntimeConfig) GetSELinux

func (m *RuntimeConfig) GetSELinux() bool

func (*RuntimeConfig) GetStateDir

func (m *RuntimeConfig) GetStateDir() string

func (*RuntimeConfig) GetSystemDevice

func (m *RuntimeConfig) GetSystemDevice() string

func (*RuntimeConfig) GetTempDir

func (m *RuntimeConfig) GetTempDir() string

func (*RuntimeConfig) GetToken

func (m *RuntimeConfig) GetToken() string

func (*RuntimeConfig) ProtoMessage

func (*RuntimeConfig) ProtoMessage()

func (*RuntimeConfig) Reset

func (m *RuntimeConfig) Reset()

func (*RuntimeConfig) String

func (r *RuntimeConfig) String() string

String describes this configuration as text

func (*RuntimeConfig) XXX_DiscardUnknown

func (m *RuntimeConfig) XXX_DiscardUnknown()

func (*RuntimeConfig) XXX_Marshal

func (m *RuntimeConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RuntimeConfig) XXX_Merge

func (m *RuntimeConfig) XXX_Merge(src proto.Message)

func (*RuntimeConfig) XXX_Size

func (m *RuntimeConfig) XXX_Size() int

func (*RuntimeConfig) XXX_Unmarshal

func (m *RuntimeConfig) XXX_Unmarshal(b []byte) error

type ShutdownRequest

type ShutdownRequest struct {
	// Completed indicates that the operation has been completed.
	// Agents may choose to prevent restart after receiving the shutdown request
	// with Completed = true
	Completed            bool     `protobuf:"varint,1,opt,name=completed,proto3" json:"completed,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

ShutdownRequest describes a request to shut down a report RPC agent

func (*ShutdownRequest) Descriptor

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

func (*ShutdownRequest) GetCompleted

func (m *ShutdownRequest) GetCompleted() bool

func (*ShutdownRequest) ProtoMessage

func (*ShutdownRequest) ProtoMessage()

func (*ShutdownRequest) Reset

func (m *ShutdownRequest) Reset()

func (*ShutdownRequest) String

func (m *ShutdownRequest) String() string

func (*ShutdownRequest) XXX_DiscardUnknown

func (m *ShutdownRequest) XXX_DiscardUnknown()

func (*ShutdownRequest) XXX_Marshal

func (m *ShutdownRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ShutdownRequest) XXX_Merge

func (m *ShutdownRequest) XXX_Merge(src proto.Message)

func (*ShutdownRequest) XXX_Size

func (m *ShutdownRequest) XXX_Size() int

func (*ShutdownRequest) XXX_Unmarshal

func (m *ShutdownRequest) XXX_Unmarshal(b []byte) error

type SystemInfo

type SystemInfo struct {
	// Payload is the opaque system information payload.
	Payload              []byte   `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

SystemInfo groups attributes that describe a system

func (*SystemInfo) Descriptor

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

func (*SystemInfo) GetPayload

func (m *SystemInfo) GetPayload() []byte

func (*SystemInfo) ProtoMessage

func (*SystemInfo) ProtoMessage()

func (*SystemInfo) Reset

func (m *SystemInfo) Reset()

func (*SystemInfo) String

func (m *SystemInfo) String() string

func (*SystemInfo) XXX_DiscardUnknown

func (m *SystemInfo) XXX_DiscardUnknown()

func (*SystemInfo) XXX_Marshal

func (m *SystemInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SystemInfo) XXX_Merge

func (m *SystemInfo) XXX_Merge(src proto.Message)

func (*SystemInfo) XXX_Size

func (m *SystemInfo) XXX_Size() int

func (*SystemInfo) XXX_Unmarshal

func (m *SystemInfo) XXX_Unmarshal(b []byte) error

type UnimplementedAgentServer

type UnimplementedAgentServer struct {
}

UnimplementedAgentServer can be embedded to have forward compatible implementations.

func (*UnimplementedAgentServer) Abort

func (*UnimplementedAgentServer) Command

func (*UnimplementedAgentServer) PeerJoin

func (*UnimplementedAgentServer) PeerLeave

func (*UnimplementedAgentServer) Shutdown

type UnimplementedDiscoveryServer

type UnimplementedDiscoveryServer struct {
}

UnimplementedDiscoveryServer can be embedded to have forward compatible implementations.

func (*UnimplementedDiscoveryServer) GetCurrentTime

func (*UnimplementedDiscoveryServer) GetRuntimeConfig

func (*UnimplementedDiscoveryServer) GetRuntimeConfig(ctx context.Context, req *types.Empty) (*RuntimeConfig, error)

func (*UnimplementedDiscoveryServer) GetSystemInfo

func (*UnimplementedDiscoveryServer) GetSystemInfo(ctx context.Context, req *types.Empty) (*SystemInfo, error)

func (*UnimplementedDiscoveryServer) GetVersion

type UninstallRequest

type UninstallRequest struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

UninstallRequest is request to uninstall the system on remote node

func (*UninstallRequest) Descriptor

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

func (*UninstallRequest) ProtoMessage

func (*UninstallRequest) ProtoMessage()

func (*UninstallRequest) Reset

func (m *UninstallRequest) Reset()

func (*UninstallRequest) String

func (m *UninstallRequest) String() string

func (*UninstallRequest) XXX_DiscardUnknown

func (m *UninstallRequest) XXX_DiscardUnknown()

func (*UninstallRequest) XXX_Marshal

func (m *UninstallRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UninstallRequest) XXX_Merge

func (m *UninstallRequest) XXX_Merge(src proto.Message)

func (*UninstallRequest) XXX_Size

func (m *UninstallRequest) XXX_Size() int

func (*UninstallRequest) XXX_Unmarshal

func (m *UninstallRequest) XXX_Unmarshal(b []byte) error

type Version

type Version struct {
	// Edition is the gravity edition, e.g. open-source
	Edition string `protobuf:"bytes,1,opt,name=edition,proto3" json:"edition,omitempty"`
	// Version is the gravity semantic version
	Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
	// GitCommit is the git commit hash
	GitCommit string `protobuf:"bytes,3,opt,name=git_commit,json=gitCommit,proto3" json:"git_commit,omitempty"`
	// Helm is the built-in Helm version
	Helm                 string   `protobuf:"bytes,4,opt,name=helm,proto3" json:"helm,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Version represents a gravity version

func (*Version) Descriptor

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

func (*Version) GetEdition

func (m *Version) GetEdition() string

func (*Version) GetGitCommit

func (m *Version) GetGitCommit() string

func (*Version) GetHelm

func (m *Version) GetHelm() string

func (*Version) GetVersion

func (m *Version) GetVersion() string

func (*Version) ProtoMessage

func (*Version) ProtoMessage()

func (*Version) Reset

func (m *Version) Reset()

func (*Version) String

func (v *Version) String() string

String returns human-friendly version string

func (*Version) XXX_DiscardUnknown

func (m *Version) XXX_DiscardUnknown()

func (*Version) XXX_Marshal

func (m *Version) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Version) XXX_Merge

func (m *Version) XXX_Merge(src proto.Message)

func (*Version) XXX_Size

func (m *Version) XXX_Size() int

func (*Version) XXX_Unmarshal

func (m *Version) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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