Documentation ¶
Overview ¶
Package rpc is a generated protocol buffer package.
It is generated from these files:
task.proto
It has these top-level messages:
TaskRequest TaskResponse
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterTaskServer ¶
func RegisterTaskServer(s *grpc.Server, srv TaskServer)
Types ¶
type TaskClient ¶
type TaskClient interface {
Run(ctx context.Context, in *TaskRequest, opts ...grpc.CallOption) (*TaskResponse, error)
}
func NewTaskClient ¶
func NewTaskClient(cc *grpc.ClientConn) TaskClient
type TaskRequest ¶
type TaskRequest struct { Command string `protobuf:"bytes,2,opt,name=command" json:"command,omitempty"` Timeout int32 `protobuf:"varint,3,opt,name=timeout" json:"timeout,omitempty"` Id int64 `protobuf:"varint,4,opt,name=id" json:"id,omitempty"` }
func (*TaskRequest) Descriptor ¶
func (*TaskRequest) Descriptor() ([]byte, []int)
func (*TaskRequest) GetCommand ¶
func (m *TaskRequest) GetCommand() string
func (*TaskRequest) GetId ¶
func (m *TaskRequest) GetId() int64
func (*TaskRequest) GetTimeout ¶
func (m *TaskRequest) GetTimeout() int32
func (*TaskRequest) ProtoMessage ¶
func (*TaskRequest) ProtoMessage()
func (*TaskRequest) Reset ¶
func (m *TaskRequest) Reset()
func (*TaskRequest) String ¶
func (m *TaskRequest) String() string
type TaskResponse ¶
type TaskResponse struct { Output string `protobuf:"bytes,1,opt,name=output" json:"output,omitempty"` Error string `protobuf:"bytes,2,opt,name=error" json:"error,omitempty"` }
func (*TaskResponse) Descriptor ¶
func (*TaskResponse) Descriptor() ([]byte, []int)
func (*TaskResponse) GetError ¶
func (m *TaskResponse) GetError() string
func (*TaskResponse) GetOutput ¶
func (m *TaskResponse) GetOutput() string
func (*TaskResponse) ProtoMessage ¶
func (*TaskResponse) ProtoMessage()
func (*TaskResponse) Reset ¶
func (m *TaskResponse) Reset()
func (*TaskResponse) String ¶
func (m *TaskResponse) String() string
type TaskServer ¶
type TaskServer interface {
Run(context.Context, *TaskRequest) (*TaskResponse, error)
}
Click to show internal directories.
Click to hide internal directories.