Documentation ¶
Overview ¶
Package rpc implements partition.Network using rpc
Index ¶
- func DialClient(ctx context.Context, addr string) (client, error)
- func RegisterRunnerServer(s *grpc.Server, srv RunnerServer)
- func RegisterServer(ctx context.Context, srv *grpc.Server, addr string, handler Runner) (io.Closer, error)
- type RunCloser
- type RunReply
- func (*RunReply) Descriptor() ([]byte, []int)
- func (m *RunReply) GetError() string
- func (m *RunReply) GetResponse() []byte
- func (*RunReply) ProtoMessage()
- func (m *RunReply) Reset()
- func (m *RunReply) String() string
- func (m *RunReply) XXX_DiscardUnknown()
- func (m *RunReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RunReply) XXX_Merge(src proto.Message)
- func (m *RunReply) XXX_Size() int
- func (m *RunReply) XXX_Unmarshal(b []byte) error
- type RunRequest
- func (*RunRequest) Descriptor() ([]byte, []int)
- func (m *RunRequest) GetHash() uint64
- func (m *RunRequest) GetInput() []byte
- func (*RunRequest) ProtoMessage()
- func (m *RunRequest) Reset()
- func (m *RunRequest) String() string
- func (m *RunRequest) XXX_DiscardUnknown()
- func (m *RunRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RunRequest) XXX_Merge(src proto.Message)
- func (m *RunRequest) XXX_Size() int
- func (m *RunRequest) XXX_Unmarshal(b []byte) error
- type Runner
- type RunnerClient
- type RunnerServer
- type UnimplementedRunnerServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DialClient ¶
DialClient creates a RPC client
func RegisterRunnerServer ¶
func RegisterRunnerServer(s *grpc.Server, srv RunnerServer)
Types ¶
type RunCloser ¶
type RunCloser interface { Run(ctx context.Context, hash uint64, input []byte) ([]byte, error) Close() error }
RunCloser combines Runner and io.Closer
type RunReply ¶
type RunReply struct { Response []byte `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RunReply) Descriptor ¶
func (*RunReply) GetResponse ¶
func (*RunReply) ProtoMessage ¶
func (*RunReply) ProtoMessage()
func (*RunReply) XXX_DiscardUnknown ¶
func (m *RunReply) XXX_DiscardUnknown()
func (*RunReply) XXX_Marshal ¶
func (*RunReply) XXX_Unmarshal ¶
type RunRequest ¶
type RunRequest struct { Input []byte `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` Hash uint64 `protobuf:"varint,2,opt,name=hash,proto3" json:"hash,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RunRequest) Descriptor ¶
func (*RunRequest) Descriptor() ([]byte, []int)
func (*RunRequest) GetHash ¶
func (m *RunRequest) GetHash() uint64
func (*RunRequest) GetInput ¶
func (m *RunRequest) GetInput() []byte
func (*RunRequest) ProtoMessage ¶
func (*RunRequest) ProtoMessage()
func (*RunRequest) Reset ¶
func (m *RunRequest) Reset()
func (*RunRequest) String ¶
func (m *RunRequest) String() string
func (*RunRequest) XXX_DiscardUnknown ¶
func (m *RunRequest) XXX_DiscardUnknown()
func (*RunRequest) XXX_Marshal ¶
func (m *RunRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RunRequest) XXX_Merge ¶
func (m *RunRequest) XXX_Merge(src proto.Message)
func (*RunRequest) XXX_Size ¶
func (m *RunRequest) XXX_Size() int
func (*RunRequest) XXX_Unmarshal ¶
func (m *RunRequest) XXX_Unmarshal(b []byte) error
type RunnerClient ¶
type RunnerClient interface {
Run(ctx context.Context, in *RunRequest, opts ...grpc.CallOption) (*RunReply, error)
}
RunnerClient is the client API for Runner service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewRunnerClient ¶
func NewRunnerClient(cc *grpc.ClientConn) RunnerClient
type RunnerServer ¶
type RunnerServer interface {
Run(context.Context, *RunRequest) (*RunReply, error)
}
RunnerServer is the server API for Runner service.
type UnimplementedRunnerServer ¶
type UnimplementedRunnerServer struct { }
UnimplementedRunnerServer can be embedded to have forward compatible implementations.
func (*UnimplementedRunnerServer) Run ¶
func (*UnimplementedRunnerServer) Run(ctx context.Context, req *RunRequest) (*RunReply, error)
Click to show internal directories.
Click to hide internal directories.