Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client contain grpc conn
func (*Client) GetRPCClient ¶
func (c *Client) GetRPCClient() pb.CoreRPCClient
GetRPCClient return rpc client
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
Pool implement of RPCClientPool
func NewCoreRPCClientPool ¶
func NewCoreRPCClientPool(ctx context.Context, config *PoolConfig) (*Pool, error)
NewCoreRPCClientPool .
func (*Pool) GetClient ¶
func (c *Pool) GetClient() pb.CoreRPCClient
GetClient finds the first *client.Client instance with an active connection. If all connections are dead, returns the first one.
type PoolConfig ¶
type PoolConfig struct { EruAddrs []string Auth types.AuthConfig ConnectionTimeout time.Duration }
PoolConfig config for client pool
Click to show internal directories.
Click to hide internal directories.