Documentation ¶
Index ¶
- Variables
- func RegisterRexServer(s *grpc.Server, srv RexServer)
- type ExecRequest
- type ExecResponse
- type GetProcessInfoRequest
- func (*GetProcessInfoRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetProcessInfoRequest) GetProcessUUID() string
- func (*GetProcessInfoRequest) ProtoMessage()
- func (x *GetProcessInfoRequest) ProtoReflect() protoreflect.Message
- func (x *GetProcessInfoRequest) Reset()
- func (x *GetProcessInfoRequest) String() string
- type KillRequest
- func (*KillRequest) Descriptor() ([]byte, []int)deprecated
- func (x *KillRequest) GetProcessUUID() string
- func (x *KillRequest) GetSignal() int32
- func (*KillRequest) ProtoMessage()
- func (x *KillRequest) ProtoReflect() protoreflect.Message
- func (x *KillRequest) Reset()
- func (x *KillRequest) String() string
- type KillResponse
- type ListProcessInfoRequest
- type ProcessInfo
- func (*ProcessInfo) Descriptor() ([]byte, []int)deprecated
- func (x *ProcessInfo) GetArgs() []string
- func (x *ProcessInfo) GetCreate() *timestamp.Timestamp
- func (x *ProcessInfo) GetExit() *timestamp.Timestamp
- func (x *ProcessInfo) GetExitCode() int32
- func (x *ProcessInfo) GetOwnerUUID() string
- func (x *ProcessInfo) GetPath() string
- func (x *ProcessInfo) GetPid() int32
- func (x *ProcessInfo) GetProcessUUID() string
- func (x *ProcessInfo) GetRunning() bool
- func (*ProcessInfo) ProtoMessage()
- func (x *ProcessInfo) ProtoReflect() protoreflect.Message
- func (x *ProcessInfo) Reset()
- func (x *ProcessInfo) String() string
- type ProcessInfoList
- type ReadRequest
- func (*ReadRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ReadRequest) GetProcessUUID() string
- func (x *ReadRequest) GetTarget() ReadRequest_File
- func (*ReadRequest) ProtoMessage()
- func (x *ReadRequest) ProtoReflect() protoreflect.Message
- func (x *ReadRequest) Reset()
- func (x *ReadRequest) String() string
- type ReadRequest_File
- func (ReadRequest_File) Descriptor() protoreflect.EnumDescriptor
- func (x ReadRequest_File) Enum() *ReadRequest_File
- func (ReadRequest_File) EnumDescriptor() ([]byte, []int)deprecated
- func (x ReadRequest_File) Number() protoreflect.EnumNumber
- func (x ReadRequest_File) String() string
- func (ReadRequest_File) Type() protoreflect.EnumType
- type ReadResponse
- type RexClient
- type RexServer
- type UnimplementedRexServer
- func (*UnimplementedRexServer) Exec(context.Context, *ExecRequest) (*ExecResponse, error)
- func (*UnimplementedRexServer) GetProcessInfo(context.Context, *GetProcessInfoRequest) (*ProcessInfo, error)
- func (*UnimplementedRexServer) Kill(context.Context, *KillRequest) (*KillResponse, error)
- func (*UnimplementedRexServer) ListProcessInfo(context.Context, *ListProcessInfoRequest) (*ProcessInfoList, error)
- func (*UnimplementedRexServer) Read(context.Context, *ReadRequest) (*ReadResponse, error)
Constants ¶
This section is empty.
Variables ¶
var ( ReadRequest_File_name = map[int32]string{ 0: "STDOUT", 1: "STDERR", } ReadRequest_File_value = map[string]int32{ "STDOUT": 0, "STDERR": 1, } )
Enum value maps for ReadRequest_File.
var File_rex_proto protoreflect.FileDescriptor
Functions ¶
func RegisterRexServer ¶
Types ¶
type ExecRequest ¶
type ExecRequest struct { // path is the absolute or relative (to server dir) path to an executable Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` // args is a list of command line args that will be passed to the // executable upon execution. Args []string `protobuf:"bytes,2,rep,name=args,proto3" json:"args,omitempty"` // contains filtered or unexported fields }
ExecRequest specifies what binary needs to be Exec'd and how.
func (*ExecRequest) Descriptor
deprecated
func (*ExecRequest) Descriptor() ([]byte, []int)
Deprecated: Use ExecRequest.ProtoReflect.Descriptor instead.
func (*ExecRequest) GetArgs ¶
func (x *ExecRequest) GetArgs() []string
func (*ExecRequest) GetPath ¶
func (x *ExecRequest) GetPath() string
func (*ExecRequest) ProtoMessage ¶
func (*ExecRequest) ProtoMessage()
func (*ExecRequest) ProtoReflect ¶
func (x *ExecRequest) ProtoReflect() protoreflect.Message
func (*ExecRequest) Reset ¶
func (x *ExecRequest) Reset()
func (*ExecRequest) String ¶
func (x *ExecRequest) String() string
type ExecResponse ¶
type ExecResponse struct { // ProcessUUID is the UUID of the process that is created when Exec returns // without error. ProcessUUID string `protobuf:"bytes,1,opt,name=ProcessUUID,proto3" json:"ProcessUUID,omitempty"` // TODO: validate UUID here // contains filtered or unexported fields }
ExecResponse embodies the identifier of the newly created process if the call to Exec had been successful.
func (*ExecResponse) Descriptor
deprecated
func (*ExecResponse) Descriptor() ([]byte, []int)
Deprecated: Use ExecResponse.ProtoReflect.Descriptor instead.
func (*ExecResponse) GetProcessUUID ¶
func (x *ExecResponse) GetProcessUUID() string
func (*ExecResponse) ProtoMessage ¶
func (*ExecResponse) ProtoMessage()
func (*ExecResponse) ProtoReflect ¶
func (x *ExecResponse) ProtoReflect() protoreflect.Message
func (*ExecResponse) Reset ¶
func (x *ExecResponse) Reset()
func (*ExecResponse) String ¶
func (x *ExecResponse) String() string
type GetProcessInfoRequest ¶
type GetProcessInfoRequest struct { ProcessUUID string `protobuf:"bytes,1,opt,name=processUUID,proto3" json:"processUUID,omitempty"` // contains filtered or unexported fields }
func (*GetProcessInfoRequest) Descriptor
deprecated
func (*GetProcessInfoRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetProcessInfoRequest.ProtoReflect.Descriptor instead.
func (*GetProcessInfoRequest) GetProcessUUID ¶
func (x *GetProcessInfoRequest) GetProcessUUID() string
func (*GetProcessInfoRequest) ProtoMessage ¶
func (*GetProcessInfoRequest) ProtoMessage()
func (*GetProcessInfoRequest) ProtoReflect ¶
func (x *GetProcessInfoRequest) ProtoReflect() protoreflect.Message
func (*GetProcessInfoRequest) Reset ¶
func (x *GetProcessInfoRequest) Reset()
func (*GetProcessInfoRequest) String ¶
func (x *GetProcessInfoRequest) String() string
type KillRequest ¶
type KillRequest struct { ProcessUUID string `protobuf:"bytes,1,opt,name=processUUID,proto3" json:"processUUID,omitempty"` Signal int32 `protobuf:"varint,2,opt,name=signal,proto3" json:"signal,omitempty"` // contains filtered or unexported fields }
func (*KillRequest) Descriptor
deprecated
func (*KillRequest) Descriptor() ([]byte, []int)
Deprecated: Use KillRequest.ProtoReflect.Descriptor instead.
func (*KillRequest) GetProcessUUID ¶
func (x *KillRequest) GetProcessUUID() string
func (*KillRequest) GetSignal ¶
func (x *KillRequest) GetSignal() int32
func (*KillRequest) ProtoMessage ¶
func (*KillRequest) ProtoMessage()
func (*KillRequest) ProtoReflect ¶
func (x *KillRequest) ProtoReflect() protoreflect.Message
func (*KillRequest) Reset ¶
func (x *KillRequest) Reset()
func (*KillRequest) String ¶
func (x *KillRequest) String() string
type KillResponse ¶
type KillResponse struct {
// contains filtered or unexported fields
}
func (*KillResponse) Descriptor
deprecated
func (*KillResponse) Descriptor() ([]byte, []int)
Deprecated: Use KillResponse.ProtoReflect.Descriptor instead.
func (*KillResponse) ProtoMessage ¶
func (*KillResponse) ProtoMessage()
func (*KillResponse) ProtoReflect ¶
func (x *KillResponse) ProtoReflect() protoreflect.Message
func (*KillResponse) Reset ¶
func (x *KillResponse) Reset()
func (*KillResponse) String ¶
func (x *KillResponse) String() string
type ListProcessInfoRequest ¶
type ListProcessInfoRequest struct {
// contains filtered or unexported fields
}
func (*ListProcessInfoRequest) Descriptor
deprecated
func (*ListProcessInfoRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListProcessInfoRequest.ProtoReflect.Descriptor instead.
func (*ListProcessInfoRequest) ProtoMessage ¶
func (*ListProcessInfoRequest) ProtoMessage()
func (*ListProcessInfoRequest) ProtoReflect ¶
func (x *ListProcessInfoRequest) ProtoReflect() protoreflect.Message
func (*ListProcessInfoRequest) Reset ¶
func (x *ListProcessInfoRequest) Reset()
func (*ListProcessInfoRequest) String ¶
func (x *ListProcessInfoRequest) String() string
type ProcessInfo ¶
type ProcessInfo struct { ProcessUUID string `protobuf:"bytes,1,opt,name=processUUID,proto3" json:"processUUID,omitempty"` Pid int32 `protobuf:"varint,2,opt,name=pid,proto3" json:"pid,omitempty"` ExitCode int32 `protobuf:"varint,3,opt,name=exitCode,proto3" json:"exitCode,omitempty"` Running bool `protobuf:"varint,4,opt,name=running,proto3" json:"running,omitempty"` Path string `protobuf:"bytes,5,opt,name=path,proto3" json:"path,omitempty"` Args []string `protobuf:"bytes,6,rep,name=args,proto3" json:"args,omitempty"` OwnerUUID string `protobuf:"bytes,7,opt,name=ownerUUID,proto3" json:"ownerUUID,omitempty"` Create *timestamp.Timestamp `protobuf:"bytes,8,opt,name=create,proto3" json:"create,omitempty"` Exit *timestamp.Timestamp `protobuf:"bytes,9,opt,name=exit,proto3" json:"exit,omitempty"` // contains filtered or unexported fields }
ProcessInfo is the summarized information about a particular process
func (*ProcessInfo) Descriptor
deprecated
func (*ProcessInfo) Descriptor() ([]byte, []int)
Deprecated: Use ProcessInfo.ProtoReflect.Descriptor instead.
func (*ProcessInfo) GetArgs ¶
func (x *ProcessInfo) GetArgs() []string
func (*ProcessInfo) GetCreate ¶
func (x *ProcessInfo) GetCreate() *timestamp.Timestamp
func (*ProcessInfo) GetExit ¶
func (x *ProcessInfo) GetExit() *timestamp.Timestamp
func (*ProcessInfo) GetExitCode ¶
func (x *ProcessInfo) GetExitCode() int32
func (*ProcessInfo) GetOwnerUUID ¶
func (x *ProcessInfo) GetOwnerUUID() string
func (*ProcessInfo) GetPath ¶
func (x *ProcessInfo) GetPath() string
func (*ProcessInfo) GetPid ¶
func (x *ProcessInfo) GetPid() int32
func (*ProcessInfo) GetProcessUUID ¶
func (x *ProcessInfo) GetProcessUUID() string
func (*ProcessInfo) GetRunning ¶
func (x *ProcessInfo) GetRunning() bool
func (*ProcessInfo) ProtoMessage ¶
func (*ProcessInfo) ProtoMessage()
func (*ProcessInfo) ProtoReflect ¶
func (x *ProcessInfo) ProtoReflect() protoreflect.Message
func (*ProcessInfo) Reset ¶
func (x *ProcessInfo) Reset()
func (*ProcessInfo) String ¶
func (x *ProcessInfo) String() string
type ProcessInfoList ¶
type ProcessInfoList struct { Processes []*ProcessInfo `protobuf:"bytes,1,rep,name=processes,proto3" json:"processes,omitempty"` // contains filtered or unexported fields }
ProcessInfoList embodies a list of ProcessInfo messages
func (*ProcessInfoList) Descriptor
deprecated
func (*ProcessInfoList) Descriptor() ([]byte, []int)
Deprecated: Use ProcessInfoList.ProtoReflect.Descriptor instead.
func (*ProcessInfoList) GetProcesses ¶
func (x *ProcessInfoList) GetProcesses() []*ProcessInfo
func (*ProcessInfoList) ProtoMessage ¶
func (*ProcessInfoList) ProtoMessage()
func (*ProcessInfoList) ProtoReflect ¶
func (x *ProcessInfoList) ProtoReflect() protoreflect.Message
func (*ProcessInfoList) Reset ¶
func (x *ProcessInfoList) Reset()
func (*ProcessInfoList) String ¶
func (x *ProcessInfoList) String() string
type ReadRequest ¶
type ReadRequest struct { ProcessUUID string `protobuf:"bytes,1,opt,name=processUUID,proto3" json:"processUUID,omitempty"` Target ReadRequest_File `protobuf:"varint,2,opt,name=target,proto3,enum=ReadRequest_File" json:"target,omitempty"` // contains filtered or unexported fields }
func (*ReadRequest) Descriptor
deprecated
func (*ReadRequest) Descriptor() ([]byte, []int)
Deprecated: Use ReadRequest.ProtoReflect.Descriptor instead.
func (*ReadRequest) GetProcessUUID ¶
func (x *ReadRequest) GetProcessUUID() string
func (*ReadRequest) GetTarget ¶
func (x *ReadRequest) GetTarget() ReadRequest_File
func (*ReadRequest) ProtoMessage ¶
func (*ReadRequest) ProtoMessage()
func (*ReadRequest) ProtoReflect ¶
func (x *ReadRequest) ProtoReflect() protoreflect.Message
func (*ReadRequest) Reset ¶
func (x *ReadRequest) Reset()
func (*ReadRequest) String ¶
func (x *ReadRequest) String() string
type ReadRequest_File ¶
type ReadRequest_File int32
const ( // cannot start enum values from 1. ReadRequest_STDOUT ReadRequest_File = 0 ReadRequest_STDERR ReadRequest_File = 1 )
func (ReadRequest_File) Descriptor ¶
func (ReadRequest_File) Descriptor() protoreflect.EnumDescriptor
func (ReadRequest_File) Enum ¶
func (x ReadRequest_File) Enum() *ReadRequest_File
func (ReadRequest_File) EnumDescriptor
deprecated
func (ReadRequest_File) EnumDescriptor() ([]byte, []int)
Deprecated: Use ReadRequest_File.Descriptor instead.
func (ReadRequest_File) Number ¶
func (x ReadRequest_File) Number() protoreflect.EnumNumber
func (ReadRequest_File) String ¶
func (x ReadRequest_File) String() string
func (ReadRequest_File) Type ¶
func (ReadRequest_File) Type() protoreflect.EnumType
type ReadResponse ¶
type ReadResponse struct { Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` // contains filtered or unexported fields }
func (*ReadResponse) Descriptor
deprecated
func (*ReadResponse) Descriptor() ([]byte, []int)
Deprecated: Use ReadResponse.ProtoReflect.Descriptor instead.
func (*ReadResponse) GetContent ¶
func (x *ReadResponse) GetContent() []byte
func (*ReadResponse) ProtoMessage ¶
func (*ReadResponse) ProtoMessage()
func (*ReadResponse) ProtoReflect ¶
func (x *ReadResponse) ProtoReflect() protoreflect.Message
func (*ReadResponse) Reset ¶
func (x *ReadResponse) Reset()
func (*ReadResponse) String ¶
func (x *ReadResponse) String() string
type RexClient ¶
type RexClient interface { // Exec executes a specified command and returns the result of *starting* // the execution of the command. Exec(ctx context.Context, in *ExecRequest, opts ...grpc.CallOption) (*ExecResponse, error) // ListProcessInfo returns a list containing summarized information // about each process that has been created in the system. ListProcessInfo(ctx context.Context, in *ListProcessInfoRequest, opts ...grpc.CallOption) (*ProcessInfoList, error) // GetProcessInfo retrieves the process info of a particular process GetProcessInfo(ctx context.Context, in *GetProcessInfoRequest, opts ...grpc.CallOption) (*ProcessInfo, error) // Kill sends a signal to the specified process Kill(ctx context.Context, in *KillRequest, opts ...grpc.CallOption) (*KillResponse, error) // Read returns the stdout or the stderr of a process Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (*ReadResponse, error) }
RexClient is the client API for Rex service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewRexClient ¶
func NewRexClient(cc grpc.ClientConnInterface) RexClient
type RexServer ¶
type RexServer interface { // Exec executes a specified command and returns the result of *starting* // the execution of the command. Exec(context.Context, *ExecRequest) (*ExecResponse, error) // ListProcessInfo returns a list containing summarized information // about each process that has been created in the system. ListProcessInfo(context.Context, *ListProcessInfoRequest) (*ProcessInfoList, error) // GetProcessInfo retrieves the process info of a particular process GetProcessInfo(context.Context, *GetProcessInfoRequest) (*ProcessInfo, error) // Kill sends a signal to the specified process Kill(context.Context, *KillRequest) (*KillResponse, error) // Read returns the stdout or the stderr of a process Read(context.Context, *ReadRequest) (*ReadResponse, error) // contains filtered or unexported methods }
RexServer is the server API for Rex service. All implementations must embed UnimplementedRexServer for forward compatibility
type UnimplementedRexServer ¶
type UnimplementedRexServer struct { }
UnimplementedRexServer must be embedded to have forward compatible implementations.
func (*UnimplementedRexServer) Exec ¶
func (*UnimplementedRexServer) Exec(context.Context, *ExecRequest) (*ExecResponse, error)
func (*UnimplementedRexServer) GetProcessInfo ¶
func (*UnimplementedRexServer) GetProcessInfo(context.Context, *GetProcessInfoRequest) (*ProcessInfo, error)
func (*UnimplementedRexServer) Kill ¶
func (*UnimplementedRexServer) Kill(context.Context, *KillRequest) (*KillResponse, error)
func (*UnimplementedRexServer) ListProcessInfo ¶
func (*UnimplementedRexServer) ListProcessInfo(context.Context, *ListProcessInfoRequest) (*ProcessInfoList, error)
func (*UnimplementedRexServer) Read ¶
func (*UnimplementedRexServer) Read(context.Context, *ReadRequest) (*ReadResponse, error)