Documentation
¶
Index ¶
- type HandleFunc
- type RPC
- func (r *RPC) Call(ctx context.Context, msgCode uint64, arg interface{}, result interface{}) error
- func (r *RPC) Debug(msg string, ctx ...interface{})
- func (r *RPC) Done() <-chan struct{}
- func (r *RPC) Error(msg string, ctx ...interface{})
- func (r *RPC) Info(msg string, ctx ...interface{})
- func (r *RPC) Notify(ctx context.Context, msgCode uint64, arg interface{}) error
- func (r *RPC) Serve(handleFunc HandleFunc, maxMsgSize uint32) error
- func (r *RPC) Warn(msg string, ctx ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HandleFunc ¶
HandleFunc to handle received messages from peer.
type RPC ¶
type RPC struct {
// contains filtered or unexported fields
}
RPC defines the common pattern that peer interacts with each other.
func (*RPC) Done ¶
func (r *RPC) Done() <-chan struct{}
Done returns a channel to indicates whether peer disconnected.
Click to show internal directories.
Click to hide internal directories.