Documentation ¶
Overview ¶
Package rpc implements MessagePack RPC.
Index ¶
- Variables
- type Call
- type Endpoint
- func (e *Endpoint) Call(method string, reply interface{}, args ...interface{}) error
- func (e *Endpoint) Close() error
- func (e *Endpoint) Go(method string, done chan *Call, reply interface{}, args ...interface{}) *Call
- func (e *Endpoint) Notify(method string, args ...interface{}) error
- func (e *Endpoint) Register(method string, fn interface{}, args ...interface{}) error
- func (e *Endpoint) Serve() error
- type Error
- type Option
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrClosed session closed error. ErrClosed = errors.New("msgpack/rpc: session closed") // ErrInternal msgpack-rpc internal error. ErrInternal = errors.New("msgpack/rpc: internal error") // ErrHandlerNotFunction handler type is not a function error. ErrHandlerNotFunction = errors.New("msgpack/rpc: handler not a function") // ErrInvalidHandlerReturn invalid handler function return type error. ErrInvalidHandlerReturn = errors.New("msgpack/rpc: handler return must be (), (error) or (valueType, error)") // ErrInvalidArgument invalid argument error. ErrInvalidArgument = errors.New("msgpack/rpc: invalid argument") )
Functions ¶
This section is empty.
Types ¶
type Endpoint ¶
type Endpoint struct {
// contains filtered or unexported fields
}
Endpoint represents a MessagePack RPC peer.
func NewEndpoint ¶
NewEndpoint returns a new endpoint with the specified options.
type Option ¶
type Option struct {
// contains filtered or unexported fields
}
Option is a configures a Endpoint.
func WithExtensions ¶
func WithExtensions(extensions msgpack.ExtensionMap) Option
WithExtensions configures Endpoint to define application-specific types.
Click to show internal directories.
Click to hide internal directories.