Versions in this module Expand all Collapse all v3 v3.1.2 Feb 5, 2024 Changes in this version + const TCPReadWriteTimeoutMinValue + const WritePkg_Timeout + func SetClientConf(c ClientConfig) + func SetServerConfig(s ServerConfig) + type Client struct + func NewClient(opt Options) *Client + func (c *Client) Close() + func (c *Client) Connect(url *common.URL) error + func (c *Client) IsAvailable() bool + func (c *Client) Request(request *remoting.Request, timeout time.Duration, ...) error + func (c *Client) SetExchangeClient(client *remoting.ExchangeClient) + type ClientConfig struct + ConnectionNum int + GettySessionParam GettySessionParam + GrPoolSize int + HeartbeatPeriod string + HeartbeatTimeout string + QueueLen int + QueueNumber int + ReconnectInterval int + SessionTimeout string + func GetDefaultClientConfig() *ClientConfig + func (c *ClientConfig) CheckValidity() error + type GettySessionParam struct + CompressEncoding bool + KeepAlivePeriod string + MaxMsgLen int + SessionName string + TcpKeepAlive bool + TcpNoDelay bool + TcpRBufSize int + TcpReadTimeout string + TcpWBufSize int + TcpWriteTimeout string + WaitTimeout string + func (c *GettySessionParam) CheckValidity() error + type Options struct + ConnectTimeout time.Duration + RequestTimeout time.Duration + type RpcClientHandler struct + func NewRpcClientHandler(client *gettyRPCClient) *RpcClientHandler + func (h *RpcClientHandler) OnClose(session getty.Session) + func (h *RpcClientHandler) OnCron(session getty.Session) + func (h *RpcClientHandler) OnError(session getty.Session, err error) + func (h *RpcClientHandler) OnMessage(session getty.Session, pkg interface{}) + func (h *RpcClientHandler) OnOpen(session getty.Session) error + type RpcClientPackageHandler struct + func NewRpcClientPackageHandler(client *Client) *RpcClientPackageHandler + func (p *RpcClientPackageHandler) Read(ss getty.Session, data []byte) (interface{}, int, error) + func (p *RpcClientPackageHandler) Write(ss getty.Session, pkg interface{}) ([]byte, error) + type RpcServerHandler struct + func NewRpcServerHandler(maxSessionNum int, sessionTimeout time.Duration, serverP *Server) *RpcServerHandler + func (h *RpcServerHandler) OnClose(session getty.Session) + func (h *RpcServerHandler) OnCron(session getty.Session) + func (h *RpcServerHandler) OnError(session getty.Session, err error) + func (h *RpcServerHandler) OnMessage(session getty.Session, pkg interface{}) + func (h *RpcServerHandler) OnOpen(session getty.Session) error + type RpcServerPackageHandler struct + func NewRpcServerPackageHandler(server *Server) *RpcServerPackageHandler + func (p *RpcServerPackageHandler) Read(ss getty.Session, data []byte) (interface{}, int, error) + func (p *RpcServerPackageHandler) Write(ss getty.Session, pkg interface{}) ([]byte, error) + type Server struct + func NewServer(url *common.URL, handlers func(*invocation.RPCInvocation) protocol.RPCResult) *Server + func (s *Server) Start() + func (s *Server) Stop() + type ServerConfig struct + GettySessionParam GettySessionParam + GrPoolSize int + HeartbeatPeriod string + HeartbeatTimeout string + QueueLen int + QueueNumber int + SSLEnabled bool + SessionNumber int + SessionTimeout string + func GetDefaultServerConfig() *ServerConfig + func GetServerConfig() ServerConfig + func (c *ServerConfig) CheckValidity() error