Documentation
¶
Index ¶
- Variables
- type MsgpackCodec
- type PBCodec
- type RpcClient
- type RpcServer
- func (this RpcServer) ActiveClientConn() []net.Conn
- func (this *RpcServer) AddPlugin(plugin server.Plugin)
- func (this *RpcServer) RegisterHandler(name string, rcvr interface{}, meta string) error
- func (this *RpcServer) RegisterName(chain *handler.Chain, meta string) error
- func (this *RpcServer) Run() error
- func (this *RpcServer) SendMessage(conn net.Conn, servicePath string, data []byte) error
- func (this RpcServer) Stop()
Constants ¶
This section is empty.
Variables ¶
View Source
var ClientOption = client.Option{ Retries: 3, RPCPath: share.DefaultRPCPath, ConnectTimeout: 10 * time.Second, SerializeType: protocol.ProtoBuffer, CompressType: protocol.None, BackupLatency: 10 * time.Millisecond, }
Functions ¶
This section is empty.
Types ¶
type MsgpackCodec ¶
type MsgpackCodec struct { }
func (*MsgpackCodec) Decode ¶
func (c *MsgpackCodec) Decode(data []byte, i interface{}) error
func (*MsgpackCodec) Encode ¶
func (c *MsgpackCodec) Encode(i interface{}) ([]byte, error)
type PBCodec ¶
type PBCodec struct{}
PBCodec uses protobuf marshaler and unmarshaler.
type RpcClient ¶
type RpcClient struct {
// contains filtered or unexported fields
}
func NewRpcClient ¶
func (*RpcClient) GetAddress ¶
type RpcServer ¶
type RpcServer struct {
// contains filtered or unexported fields
}
func NewRpcServer ¶
func (RpcServer) ActiveClientConn ¶
func (*RpcServer) RegisterHandler ¶
func (*RpcServer) RegisterName ¶
func (*RpcServer) SendMessage ¶
send mesage by bidirectional
Click to show internal directories.
Click to hide internal directories.