rpc

package
v1.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2017 License: MIT Imports: 5 Imported by: 0

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"`
}

func (*TaskRequest) Descriptor

func (*TaskRequest) Descriptor() ([]byte, []int)

func (*TaskRequest) GetCommand

func (m *TaskRequest) GetCommand() string

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)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL