Versions in this module Expand all Collapse all v1 v1.0.0 Oct 13, 2022 Changes in this version + func Encode(data Data) ([]byte, error) + type Client struct + func NewClient(conn net.Conn) *Client + func (c *Client) Call(name string, fptr interface{}) + func (c *Client) GetConn() net.Conn + type Config struct + MaxIdleCount int + MaxOpenCount int + RpcServerAddr string + type ConnPool struct + func NewPool(config *Config) *ConnPool + func (pool *ConnPool) Achieve(ctx context.Context) (permission Permission, err error) + func (pool *ConnPool) Exec(ctx context.Context, handle func(client *Client)) error + func (pool *ConnPool) Release(client *Client, ctx context.Context) (result bool, err error) + func (pool *ConnPool) Stat() Stat + type Data struct + Args []interface{} + Err string + Name string + func Decode(b []byte) (Data, error) + type NextConnIndex struct + Index int + type Permission struct + CreateAt time.Time + MaxLifeTime time.Duration + RpcCli *Client + type Server struct + func NewServer(addr string) *Server + func (s *Server) Register(name string, f interface{}) + func (s *Server) Run() + type Stat struct + IdleCount int + OpenCount int + WaitCount int + type Transport struct + func NewTransport(conn net.Conn) *Transport + func (t *Transport) Receive() (Data, error) + func (t *Transport) Send(req Data) error