Documentation ¶
Index ¶
- func GetAddress(addressList []string) string
- type Client
- type Http
- type HttpClient
- func (c *HttpClient) BatchAppend(method string, params any, result any, isNotify bool) *error
- func (c *HttpClient) BatchCall() error
- func (c *HttpClient) Call(method string, params any, result any, isNotify bool) error
- func (c *HttpClient) GetAddress() (string, error)
- func (c *HttpClient) SetAddressList()
- func (c *HttpClient) SetOptions(httpOptions any)
- func (c *HttpClient) SetPoolOptions(httpOptions any)
- type Pool
- func (p *Pool) ActiveAddress() (int, error)
- func (p *Pool) Borrow() (net.Conn, error)
- func (p *Pool) BorrowAfterRemove(conn net.Conn) (net.Conn, error)
- func (p *Pool) Connect(address string) (net.Conn, error)
- func (p *Pool) Create() (net.Conn, error)
- func (p *Pool) Release(conn net.Conn)
- func (p *Pool) Remove(conn net.Conn)
- func (p *Pool) SetOptions(options PoolOptions)
- type PoolOptions
- type Protocol
- type Tcp
- type TcpClient
- func (c *TcpClient) BatchAppend(method string, params any, result any, isNotify bool) *error
- func (c *TcpClient) BatchCall() error
- func (c *TcpClient) Call(method string, params any, result any, isNotify bool) error
- func (c *TcpClient) SetOptions(tcpOptions any)
- func (c *TcpClient) SetPoolOptions(poolOption any)
- type TcpOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAddress ¶
Types ¶
type Client ¶
type HttpClient ¶
type HttpClient struct { Name string Protocol string Address string Discovery discovery.Driver AddressList []string RequestList []*common.SingleRequest }
func NewHttpClient ¶
func (*HttpClient) BatchAppend ¶
func (*HttpClient) BatchCall ¶
func (c *HttpClient) BatchCall() error
func (*HttpClient) GetAddress ¶
func (c *HttpClient) GetAddress() (string, error)
func (*HttpClient) SetAddressList ¶
func (c *HttpClient) SetAddressList()
func (*HttpClient) SetOptions ¶
func (c *HttpClient) SetOptions(httpOptions any)
func (*HttpClient) SetPoolOptions ¶
func (c *HttpClient) SetPoolOptions(httpOptions any)
type Pool ¶
type Pool struct { Name string Discovery discovery.Driver Address string ActiveAddressList []string Lock sync.Mutex Options PoolOptions ActiveTotal int Conns chan net.Conn }
func (*Pool) ActiveAddress ¶
func (*Pool) SetOptions ¶
func (p *Pool) SetOptions(options PoolOptions)
type PoolOptions ¶
type TcpClient ¶
type TcpClient struct { Name string Protocol string Address string Discovery discovery.Driver RequestList []*common.SingleRequest Options TcpOptions Pool *Pool }
func NewTcpClient ¶
func (*TcpClient) BatchAppend ¶
func (*TcpClient) SetOptions ¶
func (*TcpClient) SetPoolOptions ¶
Click to show internal directories.
Click to hide internal directories.