Documentation ¶
Index ¶
- Variables
- func ListenAndServe(port string) error
- func RegisterCommandExecutorServer(s grpc.ServiceRegistrar, srv CommandExecutorServer)
- type CPUExecutor
- type CPUResult
- type Client
- type Command
- type CommandExecutorClient
- type CommandExecutorServer
- type DiskExecutor
- type DiskResult
- type DockerExecutor
- type DockerResult
- type ExecuteCommandRequest
- func (*ExecuteCommandRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ExecuteCommandRequest) GetArguments() string
- func (x *ExecuteCommandRequest) GetCommand() string
- func (x *ExecuteCommandRequest) GetPayload() []byte
- func (*ExecuteCommandRequest) ProtoMessage()
- func (x *ExecuteCommandRequest) ProtoReflect() protoreflect.Message
- func (x *ExecuteCommandRequest) Reset()
- func (x *ExecuteCommandRequest) String() string
- type ExecuteCommandResponse
- func (*ExecuteCommandResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ExecuteCommandResponse) GetResult() []byte
- func (*ExecuteCommandResponse) ProtoMessage()
- func (x *ExecuteCommandResponse) ProtoReflect() protoreflect.Message
- func (x *ExecuteCommandResponse) Reset()
- func (x *ExecuteCommandResponse) String() string
- type Executor
- type MemoryExecutor
- type MemoryResult
- type Result
- type UnimplementedCommandExecutorServer
- type UnsafeCommandExecutorServer
Constants ¶
This section is empty.
Variables ¶
var CommandExecutor_ServiceDesc = grpc.ServiceDesc{ ServiceName: "CommandExecutor", HandlerType: (*CommandExecutorServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Execute", Handler: _CommandExecutor_Execute_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "internal/commander/command.proto", }
CommandExecutor_ServiceDesc is the grpc.ServiceDesc for CommandExecutor service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_internal_commander_command_proto protoreflect.FileDescriptor
Functions ¶
func ListenAndServe ¶
func RegisterCommandExecutorServer ¶
func RegisterCommandExecutorServer(s grpc.ServiceRegistrar, srv CommandExecutorServer)
Types ¶
type CPUExecutor ¶
type CPUExecutor struct {
// contains filtered or unexported fields
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CheckMemory ¶
func (c *Client) CheckMemory(ctx context.Context) (*MemoryResult, error)
type CommandExecutorClient ¶
type CommandExecutorClient interface {
Execute(ctx context.Context, in *ExecuteCommandRequest, opts ...grpc.CallOption) (*ExecuteCommandResponse, error)
}
CommandExecutorClient is the client API for CommandExecutor 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 NewCommandExecutorClient ¶
func NewCommandExecutorClient(cc grpc.ClientConnInterface) CommandExecutorClient
type CommandExecutorServer ¶
type CommandExecutorServer interface { Execute(context.Context, *ExecuteCommandRequest) (*ExecuteCommandResponse, error) // contains filtered or unexported methods }
CommandExecutorServer is the server API for CommandExecutor service. All implementations must embed UnimplementedCommandExecutorServer for forward compatibility
type DiskExecutor ¶
type DiskExecutor struct{}
type DiskResult ¶
func (*DiskResult) Bytes ¶
func (m *DiskResult) Bytes() []byte
type DockerExecutor ¶
type DockerExecutor struct{}
type DockerResult ¶
func (*DockerResult) Bytes ¶
func (m *DockerResult) Bytes() []byte
type ExecuteCommandRequest ¶
type ExecuteCommandRequest struct { Command string `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"` Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` Arguments string `protobuf:"bytes,3,opt,name=arguments,proto3" json:"arguments,omitempty"` // contains filtered or unexported fields }
func (*ExecuteCommandRequest) Descriptor
deprecated
func (*ExecuteCommandRequest) Descriptor() ([]byte, []int)
Deprecated: Use ExecuteCommandRequest.ProtoReflect.Descriptor instead.
func (*ExecuteCommandRequest) GetArguments ¶
func (x *ExecuteCommandRequest) GetArguments() string
func (*ExecuteCommandRequest) GetCommand ¶
func (x *ExecuteCommandRequest) GetCommand() string
func (*ExecuteCommandRequest) GetPayload ¶
func (x *ExecuteCommandRequest) GetPayload() []byte
func (*ExecuteCommandRequest) ProtoMessage ¶
func (*ExecuteCommandRequest) ProtoMessage()
func (*ExecuteCommandRequest) ProtoReflect ¶
func (x *ExecuteCommandRequest) ProtoReflect() protoreflect.Message
func (*ExecuteCommandRequest) Reset ¶
func (x *ExecuteCommandRequest) Reset()
func (*ExecuteCommandRequest) String ¶
func (x *ExecuteCommandRequest) String() string
type ExecuteCommandResponse ¶
type ExecuteCommandResponse struct { Result []byte `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` // contains filtered or unexported fields }
func (*ExecuteCommandResponse) Descriptor
deprecated
func (*ExecuteCommandResponse) Descriptor() ([]byte, []int)
Deprecated: Use ExecuteCommandResponse.ProtoReflect.Descriptor instead.
func (*ExecuteCommandResponse) GetResult ¶
func (x *ExecuteCommandResponse) GetResult() []byte
func (*ExecuteCommandResponse) ProtoMessage ¶
func (*ExecuteCommandResponse) ProtoMessage()
func (*ExecuteCommandResponse) ProtoReflect ¶
func (x *ExecuteCommandResponse) ProtoReflect() protoreflect.Message
func (*ExecuteCommandResponse) Reset ¶
func (x *ExecuteCommandResponse) Reset()
func (*ExecuteCommandResponse) String ¶
func (x *ExecuteCommandResponse) String() string
type MemoryExecutor ¶
type MemoryExecutor struct{}
type MemoryResult ¶
func (*MemoryResult) Bytes ¶
func (m *MemoryResult) Bytes() []byte
type UnimplementedCommandExecutorServer ¶
type UnimplementedCommandExecutorServer struct { }
UnimplementedCommandExecutorServer must be embedded to have forward compatible implementations.
func (UnimplementedCommandExecutorServer) Execute ¶
func (UnimplementedCommandExecutorServer) Execute(context.Context, *ExecuteCommandRequest) (*ExecuteCommandResponse, error)
type UnsafeCommandExecutorServer ¶
type UnsafeCommandExecutorServer interface {
// contains filtered or unexported methods
}
UnsafeCommandExecutorServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CommandExecutorServer will result in compilation errors.