Versions in this module Expand all Collapse all v0 v0.1.3 Aug 2, 2022 v0.1.2 Jul 29, 2022 Changes in this version + const ConnectionLong + const ConnectionShort + var DefaultServerServiceToConnectionControl = map[config.ClusterType]int + func IsAvailableConnection(conn *Connection) bool + func ToGRPCConn(conn ClosableConn) *grpc.ClientConn + type ClientInfo struct + HashKey atomic.Value + IP atomic.Value + func (c *ClientInfo) GetHashKey() []byte + func (c *ClientInfo) GetIPString() string + type ClosableConn interface + Close func() error + type ConnCreator interface + CreateConnection func(address string, timeout time.Duration, clientInfo *ClientInfo) (ClosableConn, error) + Name func() string + type ConnID struct + Address string + ID uint32 + Service config.ClusterService + func (c ConnID) String() string + type Connection struct + Conn ClosableConn + func (c *Connection) ForceClose() bool + func (c *Connection) Release(opKey string) + type ConnectionManager interface + ConnectByAddr func(clusterType config.ClusterType, addr string, instance model.Instance) (*Connection, error) + Destroy func() + GetClientInfo func() *ClientInfo + GetConnection func(opKey string, clusterType config.ClusterType) (*Connection, error) + GetConnectionByHashKey func(opKey string, clusterType config.ClusterType, hashKey []byte) (*Connection, error) + GetHashExpectedInstance func(clusterType config.ClusterType, hash []byte) (string, model.Instance, error) + IsReady func() bool + ReportConnectionDown func(connID ConnID) + ReportFail func(connID ConnID, retCode int32, timeout time.Duration) + ReportSuccess func(connID ConnID, retCode int32, timeout time.Duration) + SetConnCreator func(creator ConnCreator) + UpdateServers func(svcEventKey model.ServiceEventKey) + func NewConfigConnectionManager(cfg config.Configuration, valueCtx model.ValueContext) (ConnectionManager, error) + func NewConnectionManager(cfg config.Configuration, valueCtx model.ValueContext) (ConnectionManager, error) + type ServerAddressList struct + func (s *ServerAddressList) ConnectServerByAddrOnly(addr string, timeout time.Duration, clsService config.ClusterService, ...) (*Connection, error)