Versions in this module Expand all Collapse all v1 v1.2.1 Nov 9, 2021 Changes in this version + const EventChangedCluster + const EventConnected + const EventConnectionClosed + const EventConnectionOpened + const EventDisconnected + const EventMembersAdded + const EventMembersRemoved + func NewDefaultAddressTranslator() *defaultAddressTranslator + func NewDefaultPublicAddressTranslator() *defaultPublicAddressTranslator + func ParseAddress(addr string) (pubcluster.Address, error) + type AddrSet struct + func NewAddrSet() AddrSet + func (a AddrSet) AddAddr(addr pubcluster.Address) + func (a AddrSet) AddAddrs(addrs []pubcluster.Address) + func (a AddrSet) Addrs() []pubcluster.Address + type AddressProvider interface + Addresses func() ([]pubcluster.Address, error) + type AddressTranslator interface + Translate func(ctx context.Context, address pubcluster.Address) (addr pubcluster.Address, err error) + TranslateMember func(ctx context.Context, member *pubcluster.MemberInfo) (addr pubcluster.Address, err error) + type CandidateCluster struct + AddressProvider AddressProvider + AddressTranslator AddressTranslator + ClusterName string + ConnectionStrategy *pubcluster.ConnectionStrategyConfig + Credentials security.Credentials + type ChangedCluster struct + func NewChangedCluster() *ChangedCluster + func (c *ChangedCluster) EventName() string + type Connected struct + Addr pubcluster.Address + func NewConnected(addr pubcluster.Address) *Connected + func (e *Connected) EventName() string + type ConnectedHandler func(event *Connected) + type Connection struct + func (c *Connection) ConnectionID() int64 + func (c *Connection) Endpoint() pubcluster.Address + func (c *Connection) LocalAddr() string + func (c *Connection) String() string + type ConnectionBoundInvocation struct + func (i *ConnectionBoundInvocation) CanRetry(err error) bool + func (i *ConnectionBoundInvocation) Connection() *Connection + func (i *ConnectionBoundInvocation) SetEventHandler(handler proto.ClientMessageHandler) + type ConnectionClosed struct + Conn *Connection + Err error + func NewConnectionClosed(conn *Connection, err error) *ConnectionClosed + func (c ConnectionClosed) EventName() string + type ConnectionClosedHandler func(event *ConnectionClosed) + type ConnectionInvocationFactory struct + func NewConnectionInvocationFactory(config *pubcluster.Config) *ConnectionInvocationFactory + func (f *ConnectionInvocationFactory) NewConnectionBoundInvocation(message *proto.ClientMessage, conn *Connection, ...) *ConnectionBoundInvocation + func (f *ConnectionInvocationFactory) NewInvocationOnPartitionOwner(message *proto.ClientMessage, partitionID int32) *invocation.Impl + func (f *ConnectionInvocationFactory) NewInvocationOnRandomTarget(message *proto.ClientMessage, handler proto.ClientMessageHandler) *invocation.Impl + func (f *ConnectionInvocationFactory) NewInvocationOnTarget(message *proto.ClientMessage, addr pubcluster.Address) *invocation.Impl + func (f *ConnectionInvocationFactory) NewMemberBoundInvocation(message *proto.ClientMessage, member *pubcluster.MemberInfo) *MemberBoundInvocation + type ConnectionInvocationHandler struct + func NewConnectionInvocationHandler(bundle ConnectionInvocationHandlerCreationBundle) *ConnectionInvocationHandler + func (h *ConnectionInvocationHandler) Invoke(inv invocation.Invocation) (int64, error) + type ConnectionInvocationHandlerCreationBundle struct + ClusterService *Service + Config *pubcluster.Config + ConnectionManager *ConnectionManager + Logger ilogger.Logger + func (b ConnectionInvocationHandlerCreationBundle) Check() + type ConnectionListenerBinder struct + func NewConnectionListenerBinder(connManager *ConnectionManager, invocationFactory *ConnectionInvocationFactory, ...) *ConnectionListenerBinder + func (b *ConnectionListenerBinder) Add(ctx context.Context, id types.UUID, add *proto.ClientMessage, ...) error + func (b *ConnectionListenerBinder) Remove(ctx context.Context, id types.UUID) error + type ConnectionManager struct + func NewConnectionManager(bundle ConnectionManagerCreationBundle) *ConnectionManager + func (m *ConnectionManager) ActiveConnections() []*Connection + func (m *ConnectionManager) GetConnectionForAddress(addr pubcluster.Address) *Connection + func (m *ConnectionManager) GetConnectionForPartition(partitionID int32) *Connection + func (m *ConnectionManager) NextConnectionID() int64 + func (m *ConnectionManager) RandomConnection() *Connection + func (m *ConnectionManager) Start(ctx context.Context) error + func (m *ConnectionManager) Stop() + type ConnectionManagerCreationBundle struct + ClientName string + ClusterConfig *pubcluster.Config + ClusterService *Service + EventDispatcher *event.DispatchService + FailoverConfig *pubcluster.FailoverConfig + FailoverService *FailoverService + InvocationFactory *ConnectionInvocationFactory + Labels []string + Logger ilogger.Logger + PartitionService *PartitionService + RequestCh chan<- invocation.Invocation + ResponseCh chan<- *proto.ClientMessage + SerializationService *iserialization.Service + func (b ConnectionManagerCreationBundle) Check() + type ConnectionOpened struct + Conn *Connection + func NewConnectionOpened(conn *Connection) *ConnectionOpened + func (c ConnectionOpened) EventName() string + type ConnectionOpenedHandler func(event *ConnectionOpened) + type CreationBundle struct + Config *pubcluster.Config + EventDispatcher *event.DispatchService + FailoverService *FailoverService + InvocationFactory *ConnectionInvocationFactory + Logger ilogger.Logger + PartitionService *PartitionService + RequestCh chan<- invocation.Invocation + func (b CreationBundle) Check() + type DefaultAddressProvider struct + func NewDefaultAddressProvider(networkConfig *pubcluster.NetworkConfig) *DefaultAddressProvider + func (p DefaultAddressProvider) Addresses() ([]pubcluster.Address, error) + type Disconnected struct + func NewDisconnected() *Disconnected + func (c *Disconnected) EventName() string + type DisconnectedHandler func(event *Disconnected) + type FailoverService struct + func NewFailoverService(logger ilogger.Logger, maxTries int, rootConfig pubcluster.Config, ...) *FailoverService + func (s *FailoverService) Current() *CandidateCluster + func (s *FailoverService) Next() + type Listener interface + ConnectionClosed func(connection *Connection, err error) + ConnectionOpened func(connection *Connection) + type MemberBoundInvocation struct + func NewMemberBoundInvocation(msg *proto.ClientMessage, member *pubcluster.MemberInfo, deadline time.Time, ...) *MemberBoundInvocation + func (i *MemberBoundInvocation) CanRetry(err error) bool + type MembersAdded struct + Members []pubcluster.MemberInfo + func NewMembersAdded(members []pubcluster.MemberInfo) *MembersAdded + func (m MembersAdded) EventName() string + type MembersRemoved struct + Members []pubcluster.MemberInfo + func NewMemberRemoved(members []pubcluster.MemberInfo) *MembersRemoved + func (m MembersRemoved) EventName() string + type PartitionService struct + func NewPartitionService(bundle PartitionServiceCreationBundle) *PartitionService + func (s *PartitionService) GetPartitionID(keyData *iserialization.Data) (int32, error) + func (s *PartitionService) GetPartitionOwner(partitionId int32) (types.UUID, bool) + func (s *PartitionService) PartitionCount() int32 + func (s *PartitionService) Reset() + func (s *PartitionService) Update(connID int64, partitions []proto.Pair, version int32) + type PartitionServiceCreationBundle struct + EventDispatcher *event.DispatchService + Logger ilogger.Logger + func (b PartitionServiceCreationBundle) Check() + type ResponseHandler func(msg *proto.ClientMessage) + type Service struct + func NewService(bundle CreationBundle) *Service + func (s *Service) GetMemberByUUID(uuid types.UUID) *pubcluster.MemberInfo + func (s *Service) MemberAddr(m *pubcluster.MemberInfo) (pubcluster.Address, error) + func (s *Service) MemberAddrs() []pubcluster.Address + func (s *Service) RandomDataMember() *pubcluster.MemberInfo + func (s *Service) RandomDataMemberExcluding(excluded map[pubcluster.Address]struct{}) *pubcluster.MemberInfo + func (s *Service) RefreshedSeedAddrs(clusterCtx *CandidateCluster) ([]pubcluster.Address, error) + func (s *Service) Reset() + type ViewListenerService struct + func NewViewListenerService(cs *Service, cm *ConnectionManager, dispatcher *event.DispatchService, ...) *ViewListenerService