server

package
v0.0.0-...-7b3ddb2 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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 RpcClient

type RpcClient struct {
	// contains filtered or unexported fields
}

func NewRpcClient

func NewRpcClient(serverAddress ...string) (*RpcClient, error)

client *client.OneClient

func (*RpcClient) Close

func (this *RpcClient) Close() error

func (*RpcClient) Execute

func (this *RpcClient) Execute(servicePath string, req *handler.RpcRequest) (*handler.RpcResponse, error)

func (*RpcClient) GetAddress

func (this *RpcClient) GetAddress(i int) string

func (*RpcClient) GetPoolUsed

func (this *RpcClient) GetPoolUsed() int64

func (*RpcClient) GoExecute

func (this *RpcClient) GoExecute(servicePath string, req *handler.RpcRequest) (*client.Call, error)

execute rpc method , with whie callback

func (*RpcClient) StreamExecute

func (this *RpcClient) StreamExecute(ctx context.Context, servicePath string, req *handler.RpcRequest, sc StreamCallback) (*handler.RpcResponse, error)

type RpcServer

type RpcServer struct {
	// contains filtered or unexported fields
}

func NewRpcServer

func NewRpcServer(ip string, port uint16) *RpcServer

func (RpcServer) ActiveClientConn

func (this RpcServer) ActiveClientConn() []net.Conn

func (*RpcServer) AddPlugin

func (this *RpcServer) AddPlugin(plugin server.Plugin)

func (*RpcServer) RegisterName

func (this *RpcServer) RegisterName(chain *handler.Chain, meta string) error

func (*RpcServer) Run

func (this *RpcServer) Run() error

func (*RpcServer) SendMessage

func (this *RpcServer) SendMessage(conn net.Conn, servicePath string, data []byte) error

send mesage by bidirectional

func (RpcServer) Stop

func (this RpcServer) Stop()

type StreamCallback

type StreamCallback func(msg *protocol.Message) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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