pbrpc

package
v2.0.0-alpha1+incompat... Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2015 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Overview

Package pbrpc implements a ClientCodec and ServerCodec for the rpcplus package using Protocol Buffers.

Package pbrpc is a generated protocol buffer package.

It is generated from these files:

envelope.proto

It has these top-level messages:

Request
Response

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dial

func Dial(network, address string) (*rpc.Client, error)

Dial connects to a Protobuf-RPC server at the specified network address.

func DialAuthHTTP

func DialAuthHTTP(network, address, user, password string, connectTimeout time.Duration) (*rpc.Client, error)

DialAuthHTTP with Protobuf codec.

func DialHTTP

func DialHTTP(network, address string, connectTimeout time.Duration) (*rpc.Client, error)

DialHTTP with Protobuf codec.

func NewClient

func NewClient(conn io.ReadWriteCloser) *rpc.Client

NewClient returns a new rpc.Client to handle requests to the set of services at the other end of the connection.

func NewClientCodec

func NewClientCodec(conn io.ReadWriteCloser) rpc.ClientCodec

NewClientCodec returns a new rpc.ClientCodec using Protobuf on conn.

func NewServerCodec

func NewServerCodec(rwc io.ReadWriteCloser) rpc.ServerCodec

NewServerCodec returns a new ServerCodec.

func ReadNetString

func ReadNetString(r io.Reader) (data []byte, err error)

ReadNetString reads data from a big-endian netstring.

func ServeAuthRPC

func ServeAuthRPC()

ServeAuthRPC with Protobuf codec.

func ServeRPC

func ServeRPC()

ServeRPC with Protobuf codec.

func WriteNetString

func WriteNetString(w io.Writer, data []byte) (written int, err error)

WriteNetString writes data to a big-endian netstring on a Writer. Size is always a 32-bit unsigned int.

Types

type Request

type Request struct {
	ServiceMethod    *string `protobuf:"bytes,1,opt,name=service_method" json:"service_method,omitempty"`
	Seq              *uint64 `protobuf:"fixed64,2,opt,name=seq" json:"seq,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (*Request) GetSeq

func (m *Request) GetSeq() uint64

func (*Request) GetServiceMethod

func (m *Request) GetServiceMethod() string

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) Reset

func (m *Request) Reset()

func (*Request) String

func (m *Request) String() string

type Response

type Response struct {
	ServiceMethod    *string `protobuf:"bytes,1,opt,name=service_method" json:"service_method,omitempty"`
	Seq              *uint64 `protobuf:"fixed64,2,opt,name=seq" json:"seq,omitempty"`
	Error            *string `protobuf:"bytes,3,opt,name=error" json:"error,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (*Response) GetError

func (m *Response) GetError() string

func (*Response) GetSeq

func (m *Response) GetSeq() uint64

func (*Response) GetServiceMethod

func (m *Response) GetServiceMethod() string

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) Reset

func (m *Response) Reset()

func (*Response) String

func (m *Response) String() string

Jump to

Keyboard shortcuts

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