Documentation ¶
Index ¶
- Variables
- func RegisterProcessServiceServer(s grpc.ServiceRegistrar, srv ProcessServiceServer)
- func Stderr(ctx context.Context, addr string, pid int64, out io.Writer) error
- func Stdout(ctx context.Context, addr string, pid int64, out io.Writer) error
- type CreateProcessRequest
- func (*CreateProcessRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateProcessRequest) GetArgs() []string
- func (x *CreateProcessRequest) GetName() string
- func (*CreateProcessRequest) ProtoMessage()
- func (x *CreateProcessRequest) ProtoReflect() protoreflect.Message
- func (x *CreateProcessRequest) Reset()
- func (x *CreateProcessRequest) String() string
- type ListProcessesRequest
- type Output
- type Process
- func (*Process) Descriptor() ([]byte, []int)deprecated
- func (x *Process) GetExitCode() int64
- func (x *Process) GetExitErr() string
- func (x *Process) GetPid() int64
- func (x *Process) GetState() ProcessState
- func (*Process) ProtoMessage()
- func (x *Process) ProtoReflect() protoreflect.Message
- func (x *Process) Reset()
- func (x *Process) String() string
- type ProcessOutputRequest
- func (*ProcessOutputRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ProcessOutputRequest) GetPid() int64
- func (*ProcessOutputRequest) ProtoMessage()
- func (x *ProcessOutputRequest) ProtoReflect() protoreflect.Message
- func (x *ProcessOutputRequest) Reset()
- func (x *ProcessOutputRequest) String() string
- type ProcessServiceClient
- type ProcessServiceServer
- type ProcessService_ListProcessesClient
- type ProcessService_ListProcessesServer
- type ProcessService_StderrClient
- type ProcessService_StderrServer
- type ProcessService_StdoutClient
- type ProcessService_StdoutServer
- type ProcessState
- func (ProcessState) Descriptor() protoreflect.EnumDescriptor
- func (x ProcessState) Enum() *ProcessState
- func (ProcessState) EnumDescriptor() ([]byte, []int)deprecated
- func (x ProcessState) Number() protoreflect.EnumNumber
- func (x ProcessState) String() string
- func (ProcessState) Type() protoreflect.EnumType
- type Server
- type UnimplementedProcessServiceServer
- func (UnimplementedProcessServiceServer) CreateProcesses(context.Context, *CreateProcessRequest) (*Process, error)
- func (UnimplementedProcessServiceServer) ListProcesses(*ListProcessesRequest, ProcessService_ListProcessesServer) error
- func (UnimplementedProcessServiceServer) Stderr(*ProcessOutputRequest, ProcessService_StderrServer) error
- func (UnimplementedProcessServiceServer) Stdout(*ProcessOutputRequest, ProcessService_StdoutServer) error
- type UnsafeProcessServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( ProcessState_name = map[int32]string{ 0: "PROCESS_STATE_UNSPECIFIED", 1: "PROCESS_STATE_RUNNING", 2: "PROCESS_STATE_SUCCEEDED", 3: "PROCESS_STATE_FAILED", } ProcessState_value = map[string]int32{ "PROCESS_STATE_UNSPECIFIED": 0, "PROCESS_STATE_RUNNING": 1, "PROCESS_STATE_SUCCEEDED": 2, "PROCESS_STATE_FAILED": 3, } )
Enum value maps for ProcessState.
var File_pkg_kanx_kanx_proto protoreflect.FileDescriptor
var ProcessService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "kanx.ProcessService", HandlerType: (*ProcessServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateProcesses", Handler: _ProcessService_CreateProcesses_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "ListProcesses", Handler: _ProcessService_ListProcesses_Handler, ServerStreams: true, }, { StreamName: "Stdout", Handler: _ProcessService_Stdout_Handler, ServerStreams: true, }, { StreamName: "Stderr", Handler: _ProcessService_Stderr_Handler, ServerStreams: true, }, }, Metadata: "pkg/kanx/kanx.proto", }
ProcessService_ServiceDesc is the grpc.ServiceDesc for ProcessService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterProcessServiceServer ¶
func RegisterProcessServiceServer(s grpc.ServiceRegistrar, srv ProcessServiceServer)
Types ¶
type CreateProcessRequest ¶
type CreateProcessRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Args []string `protobuf:"bytes,2,rep,name=args,proto3" json:"args,omitempty"` // contains filtered or unexported fields }
func (*CreateProcessRequest) Descriptor
deprecated
func (*CreateProcessRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateProcessRequest.ProtoReflect.Descriptor instead.
func (*CreateProcessRequest) GetArgs ¶
func (x *CreateProcessRequest) GetArgs() []string
func (*CreateProcessRequest) GetName ¶
func (x *CreateProcessRequest) GetName() string
func (*CreateProcessRequest) ProtoMessage ¶
func (*CreateProcessRequest) ProtoMessage()
func (*CreateProcessRequest) ProtoReflect ¶
func (x *CreateProcessRequest) ProtoReflect() protoreflect.Message
func (*CreateProcessRequest) Reset ¶
func (x *CreateProcessRequest) Reset()
func (*CreateProcessRequest) String ¶
func (x *CreateProcessRequest) String() string
type ListProcessesRequest ¶
type ListProcessesRequest struct {
// contains filtered or unexported fields
}
func (*ListProcessesRequest) Descriptor
deprecated
func (*ListProcessesRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListProcessesRequest.ProtoReflect.Descriptor instead.
func (*ListProcessesRequest) ProtoMessage ¶
func (*ListProcessesRequest) ProtoMessage()
func (*ListProcessesRequest) ProtoReflect ¶
func (x *ListProcessesRequest) ProtoReflect() protoreflect.Message
func (*ListProcessesRequest) Reset ¶
func (x *ListProcessesRequest) Reset()
func (*ListProcessesRequest) String ¶
func (x *ListProcessesRequest) String() string
type Output ¶
type Output struct { Output string `protobuf:"bytes,1,opt,name=output,proto3" json:"output,omitempty"` // contains filtered or unexported fields }
func (*Output) Descriptor
deprecated
func (*Output) ProtoMessage ¶
func (*Output) ProtoMessage()
func (*Output) ProtoReflect ¶
func (x *Output) ProtoReflect() protoreflect.Message
type Process ¶
type Process struct { Pid int64 `protobuf:"varint,1,opt,name=pid,proto3" json:"pid,omitempty"` State ProcessState `protobuf:"varint,2,opt,name=state,proto3,enum=kanx.ProcessState" json:"state,omitempty"` ExitCode int64 `protobuf:"varint,3,opt,name=exitCode,proto3" json:"exitCode,omitempty"` ExitErr string `protobuf:"bytes,4,opt,name=exitErr,proto3" json:"exitErr,omitempty"` // contains filtered or unexported fields }
func CreateProcess ¶
func (*Process) Descriptor
deprecated
func (*Process) GetExitCode ¶
func (*Process) GetExitErr ¶
func (*Process) GetState ¶
func (x *Process) GetState() ProcessState
func (*Process) ProtoMessage ¶
func (*Process) ProtoMessage()
func (*Process) ProtoReflect ¶
func (x *Process) ProtoReflect() protoreflect.Message
type ProcessOutputRequest ¶
type ProcessOutputRequest struct { Pid int64 `protobuf:"varint,1,opt,name=pid,proto3" json:"pid,omitempty"` // contains filtered or unexported fields }
func (*ProcessOutputRequest) Descriptor
deprecated
func (*ProcessOutputRequest) Descriptor() ([]byte, []int)
Deprecated: Use ProcessOutputRequest.ProtoReflect.Descriptor instead.
func (*ProcessOutputRequest) GetPid ¶
func (x *ProcessOutputRequest) GetPid() int64
func (*ProcessOutputRequest) ProtoMessage ¶
func (*ProcessOutputRequest) ProtoMessage()
func (*ProcessOutputRequest) ProtoReflect ¶
func (x *ProcessOutputRequest) ProtoReflect() protoreflect.Message
func (*ProcessOutputRequest) Reset ¶
func (x *ProcessOutputRequest) Reset()
func (*ProcessOutputRequest) String ¶
func (x *ProcessOutputRequest) String() string
type ProcessServiceClient ¶
type ProcessServiceClient interface { CreateProcesses(ctx context.Context, in *CreateProcessRequest, opts ...grpc.CallOption) (*Process, error) ListProcesses(ctx context.Context, in *ListProcessesRequest, opts ...grpc.CallOption) (ProcessService_ListProcessesClient, error) Stdout(ctx context.Context, in *ProcessOutputRequest, opts ...grpc.CallOption) (ProcessService_StdoutClient, error) Stderr(ctx context.Context, in *ProcessOutputRequest, opts ...grpc.CallOption) (ProcessService_StderrClient, error) }
ProcessServiceClient is the client API for ProcessService 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 NewProcessServiceClient ¶
func NewProcessServiceClient(cc grpc.ClientConnInterface) ProcessServiceClient
type ProcessServiceServer ¶
type ProcessServiceServer interface { CreateProcesses(context.Context, *CreateProcessRequest) (*Process, error) ListProcesses(*ListProcessesRequest, ProcessService_ListProcessesServer) error Stdout(*ProcessOutputRequest, ProcessService_StdoutServer) error Stderr(*ProcessOutputRequest, ProcessService_StderrServer) error // contains filtered or unexported methods }
ProcessServiceServer is the server API for ProcessService service. All implementations must embed UnimplementedProcessServiceServer for forward compatibility
type ProcessService_ListProcessesClient ¶
type ProcessService_ListProcessesClient interface { Recv() (*Process, error) grpc.ClientStream }
type ProcessService_ListProcessesServer ¶
type ProcessService_ListProcessesServer interface { Send(*Process) error grpc.ServerStream }
type ProcessService_StderrClient ¶
type ProcessService_StderrClient interface { Recv() (*Output, error) grpc.ClientStream }
type ProcessService_StderrServer ¶
type ProcessService_StderrServer interface { Send(*Output) error grpc.ServerStream }
type ProcessService_StdoutClient ¶
type ProcessService_StdoutClient interface { Recv() (*Output, error) grpc.ClientStream }
type ProcessService_StdoutServer ¶
type ProcessService_StdoutServer interface { Send(*Output) error grpc.ServerStream }
type ProcessState ¶
type ProcessState int32
const ( ProcessState_PROCESS_STATE_UNSPECIFIED ProcessState = 0 ProcessState_PROCESS_STATE_RUNNING ProcessState = 1 ProcessState_PROCESS_STATE_SUCCEEDED ProcessState = 2 ProcessState_PROCESS_STATE_FAILED ProcessState = 3 )
func (ProcessState) Descriptor ¶
func (ProcessState) Descriptor() protoreflect.EnumDescriptor
func (ProcessState) Enum ¶
func (x ProcessState) Enum() *ProcessState
func (ProcessState) EnumDescriptor
deprecated
func (ProcessState) EnumDescriptor() ([]byte, []int)
Deprecated: Use ProcessState.Descriptor instead.
func (ProcessState) Number ¶
func (x ProcessState) Number() protoreflect.EnumNumber
func (ProcessState) String ¶
func (x ProcessState) String() string
func (ProcessState) Type ¶
func (ProcessState) Type() protoreflect.EnumType
type UnimplementedProcessServiceServer ¶
type UnimplementedProcessServiceServer struct { }
UnimplementedProcessServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedProcessServiceServer) CreateProcesses ¶
func (UnimplementedProcessServiceServer) CreateProcesses(context.Context, *CreateProcessRequest) (*Process, error)
func (UnimplementedProcessServiceServer) ListProcesses ¶
func (UnimplementedProcessServiceServer) ListProcesses(*ListProcessesRequest, ProcessService_ListProcessesServer) error
type UnsafeProcessServiceServer ¶
type UnsafeProcessServiceServer interface {
// contains filtered or unexported methods
}
UnsafeProcessServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ProcessServiceServer will result in compilation errors.