Documentation
¶
Index ¶
- Variables
- func ReadAllFromCommandLog(s Executor_GetCommandLogClient) (string, error)
- func RegisterExecutorServer(s grpc.ServiceRegistrar, srv ExecutorServer)
- type EnvironmentRequest
- type EnvironmentResponse
- func (*EnvironmentResponse) Descriptor() ([]byte, []int)deprecated
- func (x *EnvironmentResponse) GetEnvironment() []string
- func (*EnvironmentResponse) ProtoMessage()
- func (x *EnvironmentResponse) ProtoReflect() protoreflect.Message
- func (x *EnvironmentResponse) Reset()
- func (x *EnvironmentResponse) String() string
- type ExecutorClient
- type ExecutorServer
- type Executor_GetCommandLogClient
- type Executor_GetCommandLogServer
- type GetCommandLogRequest
- func (*GetCommandLogRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetCommandLogRequest) GetCommandID() string
- func (*GetCommandLogRequest) ProtoMessage()
- func (x *GetCommandLogRequest) ProtoReflect() protoreflect.Message
- func (x *GetCommandLogRequest) Reset()
- func (x *GetCommandLogRequest) String() string
- type GetRuntimeInfoRequest
- type GetRuntimeInfoResponse
- func (*GetRuntimeInfoResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetRuntimeInfoResponse) GetArch() string
- func (x *GetRuntimeInfoResponse) GetOS() string
- func (*GetRuntimeInfoResponse) ProtoMessage()
- func (x *GetRuntimeInfoResponse) ProtoReflect() protoreflect.Message
- func (x *GetRuntimeInfoResponse) Reset()
- func (x *GetRuntimeInfoResponse) String() string
- type Log
- type LogSource
- type PingRequest
- type PingResponse
- type ProcessStatus
- func (*ProcessStatus) Descriptor() ([]byte, []int)deprecated
- func (x *ProcessStatus) GetError() string
- func (x *ProcessStatus) GetExit() bool
- func (x *ProcessStatus) GetExitCode() int32
- func (x *ProcessStatus) GetPid() int32
- func (*ProcessStatus) ProtoMessage()
- func (x *ProcessStatus) ProtoReflect() protoreflect.Message
- func (x *ProcessStatus) Reset()
- func (x *ProcessStatus) String() string
- type StartCommandRequest
- func (*StartCommandRequest) Descriptor() ([]byte, []int)deprecated
- func (x *StartCommandRequest) GetCommands() []string
- func (x *StartCommandRequest) GetDir() string
- func (x *StartCommandRequest) GetEnv() []string
- func (x *StartCommandRequest) GetUsername() string
- func (*StartCommandRequest) ProtoMessage()
- func (x *StartCommandRequest) ProtoReflect() protoreflect.Message
- func (x *StartCommandRequest) Reset()
- func (x *StartCommandRequest) String() string
- type StartCommandResponse
- func (*StartCommandResponse) Descriptor() ([]byte, []int)deprecated
- func (x *StartCommandResponse) GetCommandID() string
- func (x *StartCommandResponse) GetStatus() *ProcessStatus
- func (*StartCommandResponse) ProtoMessage()
- func (x *StartCommandResponse) ProtoReflect() protoreflect.Message
- func (x *StartCommandResponse) Reset()
- func (x *StartCommandResponse) String() string
- type UnimplementedExecutorServer
- func (UnimplementedExecutorServer) Environment(context.Context, *EnvironmentRequest) (*EnvironmentResponse, error)
- func (UnimplementedExecutorServer) GetCommandLog(*GetCommandLogRequest, Executor_GetCommandLogServer) error
- func (UnimplementedExecutorServer) GetRuntimeInfo(context.Context, *GetRuntimeInfoRequest) (*GetRuntimeInfoResponse, error)
- func (UnimplementedExecutorServer) Ping(context.Context, *PingRequest) (*PingResponse, error)
- func (UnimplementedExecutorServer) StartCommand(context.Context, *StartCommandRequest) (*StartCommandResponse, error)
- func (UnimplementedExecutorServer) WaitCommand(context.Context, *WaitCommandRequest) (*WaitCommandResponse, error)
- type UnsafeExecutorServer
- type WaitCommandRequest
- func (*WaitCommandRequest) Descriptor() ([]byte, []int)deprecated
- func (x *WaitCommandRequest) GetCommandID() string
- func (x *WaitCommandRequest) GetTimeout() int64
- func (*WaitCommandRequest) ProtoMessage()
- func (x *WaitCommandRequest) ProtoReflect() protoreflect.Message
- func (x *WaitCommandRequest) Reset()
- func (x *WaitCommandRequest) String() string
- type WaitCommandResponse
- func (*WaitCommandResponse) Descriptor() ([]byte, []int)deprecated
- func (x *WaitCommandResponse) GetStatus() *ProcessStatus
- func (*WaitCommandResponse) ProtoMessage()
- func (x *WaitCommandResponse) ProtoReflect() protoreflect.Message
- func (x *WaitCommandResponse) Reset()
- func (x *WaitCommandResponse) String() string
Constants ¶
This section is empty.
Variables ¶
var ( LogSource_name = map[int32]string{ 0: "STDOUT", 1: "STDERR", } LogSource_value = map[string]int32{ "STDOUT": 0, "STDERR": 1, } )
Enum value maps for LogSource.
var Executor_ServiceDesc = grpc.ServiceDesc{ ServiceName: "Executor", HandlerType: (*ExecutorServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetRuntimeInfo", Handler: _Executor_GetRuntimeInfo_Handler, }, { MethodName: "Ping", Handler: _Executor_Ping_Handler, }, { MethodName: "Environment", Handler: _Executor_Environment_Handler, }, { MethodName: "StartCommand", Handler: _Executor_StartCommand_Handler, }, { MethodName: "WaitCommand", Handler: _Executor_WaitCommand_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "GetCommandLog", Handler: _Executor_GetCommandLog_Handler, ServerStreams: true, }, }, Metadata: "service.proto", }
Executor_ServiceDesc is the grpc.ServiceDesc for Executor service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_service_proto protoreflect.FileDescriptor
Functions ¶
func ReadAllFromCommandLog ¶
func ReadAllFromCommandLog(s Executor_GetCommandLogClient) (string, error)
func RegisterExecutorServer ¶
func RegisterExecutorServer(s grpc.ServiceRegistrar, srv ExecutorServer)
Types ¶
type EnvironmentRequest ¶
type EnvironmentRequest struct {
// contains filtered or unexported fields
}
func (*EnvironmentRequest) Descriptor
deprecated
func (*EnvironmentRequest) Descriptor() ([]byte, []int)
Deprecated: Use EnvironmentRequest.ProtoReflect.Descriptor instead.
func (*EnvironmentRequest) ProtoMessage ¶
func (*EnvironmentRequest) ProtoMessage()
func (*EnvironmentRequest) ProtoReflect ¶
func (x *EnvironmentRequest) ProtoReflect() protoreflect.Message
func (*EnvironmentRequest) Reset ¶
func (x *EnvironmentRequest) Reset()
func (*EnvironmentRequest) String ¶
func (x *EnvironmentRequest) String() string
type EnvironmentResponse ¶
type EnvironmentResponse struct { Environment []string `protobuf:"bytes,1,rep,name=environment,proto3" json:"environment,omitempty"` // contains filtered or unexported fields }
func (*EnvironmentResponse) Descriptor
deprecated
func (*EnvironmentResponse) Descriptor() ([]byte, []int)
Deprecated: Use EnvironmentResponse.ProtoReflect.Descriptor instead.
func (*EnvironmentResponse) GetEnvironment ¶
func (x *EnvironmentResponse) GetEnvironment() []string
func (*EnvironmentResponse) ProtoMessage ¶
func (*EnvironmentResponse) ProtoMessage()
func (*EnvironmentResponse) ProtoReflect ¶
func (x *EnvironmentResponse) ProtoReflect() protoreflect.Message
func (*EnvironmentResponse) Reset ¶
func (x *EnvironmentResponse) Reset()
func (*EnvironmentResponse) String ¶
func (x *EnvironmentResponse) String() string
type ExecutorClient ¶
type ExecutorClient interface { GetRuntimeInfo(ctx context.Context, in *GetRuntimeInfoRequest, opts ...grpc.CallOption) (*GetRuntimeInfoResponse, error) // Ping is used to check if the executor is alive. Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) // Environment returns the environment variables of the executor. // Just like the os.Environ() function in Go. Environment(ctx context.Context, in *EnvironmentRequest, opts ...grpc.CallOption) (*EnvironmentResponse, error) // StartCommand starts a command in the executor. StartCommand(ctx context.Context, in *StartCommandRequest, opts ...grpc.CallOption) (*StartCommandResponse, error) // WaitCommand waits for a command to finish. WaitCommand(ctx context.Context, in *WaitCommandRequest, opts ...grpc.CallOption) (*WaitCommandResponse, error) // GetCommandLog returns the log of a command. GetCommandLog(ctx context.Context, in *GetCommandLogRequest, opts ...grpc.CallOption) (Executor_GetCommandLogClient, error) }
ExecutorClient is the client API for Executor 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 NewExecutorClient ¶
func NewExecutorClient(cc grpc.ClientConnInterface) ExecutorClient
type ExecutorServer ¶
type ExecutorServer interface { GetRuntimeInfo(context.Context, *GetRuntimeInfoRequest) (*GetRuntimeInfoResponse, error) // Ping is used to check if the executor is alive. Ping(context.Context, *PingRequest) (*PingResponse, error) // Environment returns the environment variables of the executor. // Just like the os.Environ() function in Go. Environment(context.Context, *EnvironmentRequest) (*EnvironmentResponse, error) // StartCommand starts a command in the executor. StartCommand(context.Context, *StartCommandRequest) (*StartCommandResponse, error) // WaitCommand waits for a command to finish. WaitCommand(context.Context, *WaitCommandRequest) (*WaitCommandResponse, error) // GetCommandLog returns the log of a command. GetCommandLog(*GetCommandLogRequest, Executor_GetCommandLogServer) error // contains filtered or unexported methods }
ExecutorServer is the server API for Executor service. All implementations must embed UnimplementedExecutorServer for forward compatibility
type Executor_GetCommandLogClient ¶
type Executor_GetCommandLogClient interface { Recv() (*Log, error) grpc.ClientStream }
type Executor_GetCommandLogServer ¶
type Executor_GetCommandLogServer interface { Send(*Log) error grpc.ServerStream }
type GetCommandLogRequest ¶
type GetCommandLogRequest struct { CommandID string `protobuf:"bytes,1,opt,name=command_id,json=commandId,proto3" json:"command_id,omitempty"` // contains filtered or unexported fields }
func (*GetCommandLogRequest) Descriptor
deprecated
func (*GetCommandLogRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetCommandLogRequest.ProtoReflect.Descriptor instead.
func (*GetCommandLogRequest) GetCommandID ¶
func (x *GetCommandLogRequest) GetCommandID() string
func (*GetCommandLogRequest) ProtoMessage ¶
func (*GetCommandLogRequest) ProtoMessage()
func (*GetCommandLogRequest) ProtoReflect ¶
func (x *GetCommandLogRequest) ProtoReflect() protoreflect.Message
func (*GetCommandLogRequest) Reset ¶
func (x *GetCommandLogRequest) Reset()
func (*GetCommandLogRequest) String ¶
func (x *GetCommandLogRequest) String() string
type GetRuntimeInfoRequest ¶
type GetRuntimeInfoRequest struct {
// contains filtered or unexported fields
}
func (*GetRuntimeInfoRequest) Descriptor
deprecated
func (*GetRuntimeInfoRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetRuntimeInfoRequest.ProtoReflect.Descriptor instead.
func (*GetRuntimeInfoRequest) ProtoMessage ¶
func (*GetRuntimeInfoRequest) ProtoMessage()
func (*GetRuntimeInfoRequest) ProtoReflect ¶
func (x *GetRuntimeInfoRequest) ProtoReflect() protoreflect.Message
func (*GetRuntimeInfoRequest) Reset ¶
func (x *GetRuntimeInfoRequest) Reset()
func (*GetRuntimeInfoRequest) String ¶
func (x *GetRuntimeInfoRequest) String() string
type GetRuntimeInfoResponse ¶
type GetRuntimeInfoResponse struct { OS string `protobuf:"bytes,1,opt,name=os,proto3" json:"os,omitempty"` Arch string `protobuf:"bytes,2,opt,name=arch,proto3" json:"arch,omitempty"` // contains filtered or unexported fields }
func (*GetRuntimeInfoResponse) Descriptor
deprecated
func (*GetRuntimeInfoResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetRuntimeInfoResponse.ProtoReflect.Descriptor instead.
func (*GetRuntimeInfoResponse) GetArch ¶
func (x *GetRuntimeInfoResponse) GetArch() string
func (*GetRuntimeInfoResponse) GetOS ¶
func (x *GetRuntimeInfoResponse) GetOS() string
func (*GetRuntimeInfoResponse) ProtoMessage ¶
func (*GetRuntimeInfoResponse) ProtoMessage()
func (*GetRuntimeInfoResponse) ProtoReflect ¶
func (x *GetRuntimeInfoResponse) ProtoReflect() protoreflect.Message
func (*GetRuntimeInfoResponse) Reset ¶
func (x *GetRuntimeInfoResponse) Reset()
func (*GetRuntimeInfoResponse) String ¶
func (x *GetRuntimeInfoResponse) String() string
type Log ¶
type Log struct { Source LogSource `protobuf:"varint,1,opt,name=source,proto3,enum=LogSource" json:"source,omitempty"` Output []byte `protobuf:"bytes,2,opt,name=output,proto3" json:"output,omitempty"` // contains filtered or unexported fields }
func (*Log) Descriptor
deprecated
func (*Log) ProtoMessage ¶
func (*Log) ProtoMessage()
func (*Log) ProtoReflect ¶
func (x *Log) ProtoReflect() protoreflect.Message
type LogSource ¶
type LogSource int32
func (LogSource) Descriptor ¶
func (LogSource) Descriptor() protoreflect.EnumDescriptor
func (LogSource) EnumDescriptor
deprecated
func (LogSource) Number ¶
func (x LogSource) Number() protoreflect.EnumNumber
func (LogSource) Type ¶
func (LogSource) Type() protoreflect.EnumType
type PingRequest ¶
type PingRequest struct {
// contains filtered or unexported fields
}
func (*PingRequest) Descriptor
deprecated
func (*PingRequest) Descriptor() ([]byte, []int)
Deprecated: Use PingRequest.ProtoReflect.Descriptor instead.
func (*PingRequest) ProtoMessage ¶
func (*PingRequest) ProtoMessage()
func (*PingRequest) ProtoReflect ¶
func (x *PingRequest) ProtoReflect() protoreflect.Message
func (*PingRequest) Reset ¶
func (x *PingRequest) Reset()
func (*PingRequest) String ¶
func (x *PingRequest) String() string
type PingResponse ¶
type PingResponse struct {
// contains filtered or unexported fields
}
func (*PingResponse) Descriptor
deprecated
func (*PingResponse) Descriptor() ([]byte, []int)
Deprecated: Use PingResponse.ProtoReflect.Descriptor instead.
func (*PingResponse) ProtoMessage ¶
func (*PingResponse) ProtoMessage()
func (*PingResponse) ProtoReflect ¶
func (x *PingResponse) ProtoReflect() protoreflect.Message
func (*PingResponse) Reset ¶
func (x *PingResponse) Reset()
func (*PingResponse) String ¶
func (x *PingResponse) String() string
type ProcessStatus ¶
type ProcessStatus struct { Pid int32 `protobuf:"varint,1,opt,name=pid,proto3" json:"pid,omitempty"` ExitCode int32 `protobuf:"varint,2,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"` Exit bool `protobuf:"varint,3,opt,name=exit,proto3" json:"exit,omitempty"` Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"` // contains filtered or unexported fields }
func (*ProcessStatus) Descriptor
deprecated
func (*ProcessStatus) Descriptor() ([]byte, []int)
Deprecated: Use ProcessStatus.ProtoReflect.Descriptor instead.
func (*ProcessStatus) GetError ¶
func (x *ProcessStatus) GetError() string
func (*ProcessStatus) GetExit ¶
func (x *ProcessStatus) GetExit() bool
func (*ProcessStatus) GetExitCode ¶
func (x *ProcessStatus) GetExitCode() int32
func (*ProcessStatus) GetPid ¶
func (x *ProcessStatus) GetPid() int32
func (*ProcessStatus) ProtoMessage ¶
func (*ProcessStatus) ProtoMessage()
func (*ProcessStatus) ProtoReflect ¶
func (x *ProcessStatus) ProtoReflect() protoreflect.Message
func (*ProcessStatus) Reset ¶
func (x *ProcessStatus) Reset()
func (*ProcessStatus) String ¶
func (x *ProcessStatus) String() string
type StartCommandRequest ¶
type StartCommandRequest struct { Commands []string `protobuf:"bytes,1,rep,name=commands,proto3" json:"commands,omitempty"` Dir string `protobuf:"bytes,2,opt,name=dir,proto3" json:"dir,omitempty"` Env []string `protobuf:"bytes,3,rep,name=env,proto3" json:"env,omitempty"` Username string `protobuf:"bytes,4,opt,name=username,proto3" json:"username,omitempty"` // contains filtered or unexported fields }
func (*StartCommandRequest) Descriptor
deprecated
func (*StartCommandRequest) Descriptor() ([]byte, []int)
Deprecated: Use StartCommandRequest.ProtoReflect.Descriptor instead.
func (*StartCommandRequest) GetCommands ¶
func (x *StartCommandRequest) GetCommands() []string
func (*StartCommandRequest) GetDir ¶
func (x *StartCommandRequest) GetDir() string
func (*StartCommandRequest) GetEnv ¶
func (x *StartCommandRequest) GetEnv() []string
func (*StartCommandRequest) GetUsername ¶
func (x *StartCommandRequest) GetUsername() string
func (*StartCommandRequest) ProtoMessage ¶
func (*StartCommandRequest) ProtoMessage()
func (*StartCommandRequest) ProtoReflect ¶
func (x *StartCommandRequest) ProtoReflect() protoreflect.Message
func (*StartCommandRequest) Reset ¶
func (x *StartCommandRequest) Reset()
func (*StartCommandRequest) String ¶
func (x *StartCommandRequest) String() string
type StartCommandResponse ¶
type StartCommandResponse struct { // CommandID is the unique identifier of the command. // It's generated by the executor and use it to get the status of the command. CommandID string `protobuf:"bytes,1,opt,name=command_id,json=commandId,proto3" json:"command_id,omitempty"` Status *ProcessStatus `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
func (*StartCommandResponse) Descriptor
deprecated
func (*StartCommandResponse) Descriptor() ([]byte, []int)
Deprecated: Use StartCommandResponse.ProtoReflect.Descriptor instead.
func (*StartCommandResponse) GetCommandID ¶
func (x *StartCommandResponse) GetCommandID() string
func (*StartCommandResponse) GetStatus ¶
func (x *StartCommandResponse) GetStatus() *ProcessStatus
func (*StartCommandResponse) ProtoMessage ¶
func (*StartCommandResponse) ProtoMessage()
func (*StartCommandResponse) ProtoReflect ¶
func (x *StartCommandResponse) ProtoReflect() protoreflect.Message
func (*StartCommandResponse) Reset ¶
func (x *StartCommandResponse) Reset()
func (*StartCommandResponse) String ¶
func (x *StartCommandResponse) String() string
type UnimplementedExecutorServer ¶
type UnimplementedExecutorServer struct { }
UnimplementedExecutorServer must be embedded to have forward compatible implementations.
func (UnimplementedExecutorServer) Environment ¶
func (UnimplementedExecutorServer) Environment(context.Context, *EnvironmentRequest) (*EnvironmentResponse, error)
func (UnimplementedExecutorServer) GetCommandLog ¶
func (UnimplementedExecutorServer) GetCommandLog(*GetCommandLogRequest, Executor_GetCommandLogServer) error
func (UnimplementedExecutorServer) GetRuntimeInfo ¶
func (UnimplementedExecutorServer) GetRuntimeInfo(context.Context, *GetRuntimeInfoRequest) (*GetRuntimeInfoResponse, error)
func (UnimplementedExecutorServer) Ping ¶
func (UnimplementedExecutorServer) Ping(context.Context, *PingRequest) (*PingResponse, error)
func (UnimplementedExecutorServer) StartCommand ¶
func (UnimplementedExecutorServer) StartCommand(context.Context, *StartCommandRequest) (*StartCommandResponse, error)
func (UnimplementedExecutorServer) WaitCommand ¶
func (UnimplementedExecutorServer) WaitCommand(context.Context, *WaitCommandRequest) (*WaitCommandResponse, error)
type UnsafeExecutorServer ¶
type UnsafeExecutorServer interface {
// contains filtered or unexported methods
}
UnsafeExecutorServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ExecutorServer will result in compilation errors.
type WaitCommandRequest ¶
type WaitCommandRequest struct { CommandID string `protobuf:"bytes,1,opt,name=command_id,json=commandId,proto3" json:"command_id,omitempty"` Timeout int64 `protobuf:"varint,2,opt,name=timeout,proto3" json:"timeout,omitempty"` // contains filtered or unexported fields }
func (*WaitCommandRequest) Descriptor
deprecated
func (*WaitCommandRequest) Descriptor() ([]byte, []int)
Deprecated: Use WaitCommandRequest.ProtoReflect.Descriptor instead.
func (*WaitCommandRequest) GetCommandID ¶
func (x *WaitCommandRequest) GetCommandID() string
func (*WaitCommandRequest) GetTimeout ¶
func (x *WaitCommandRequest) GetTimeout() int64
func (*WaitCommandRequest) ProtoMessage ¶
func (*WaitCommandRequest) ProtoMessage()
func (*WaitCommandRequest) ProtoReflect ¶
func (x *WaitCommandRequest) ProtoReflect() protoreflect.Message
func (*WaitCommandRequest) Reset ¶
func (x *WaitCommandRequest) Reset()
func (*WaitCommandRequest) String ¶
func (x *WaitCommandRequest) String() string
type WaitCommandResponse ¶
type WaitCommandResponse struct { Status *ProcessStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
func (*WaitCommandResponse) Descriptor
deprecated
func (*WaitCommandResponse) Descriptor() ([]byte, []int)
Deprecated: Use WaitCommandResponse.ProtoReflect.Descriptor instead.
func (*WaitCommandResponse) GetStatus ¶
func (x *WaitCommandResponse) GetStatus() *ProcessStatus
func (*WaitCommandResponse) ProtoMessage ¶
func (*WaitCommandResponse) ProtoMessage()
func (*WaitCommandResponse) ProtoReflect ¶
func (x *WaitCommandResponse) ProtoReflect() protoreflect.Message
func (*WaitCommandResponse) Reset ¶
func (x *WaitCommandResponse) Reset()
func (*WaitCommandResponse) String ¶
func (x *WaitCommandResponse) String() string