Documentation ¶
Index ¶
- Variables
- type Members
- func (m *Members) Add(member discovery.Member)
- func (m *Members) Delete(id uint64)
- func (m *Members) DeleteByName(other discovery.Member)
- func (m *Members) Get(id uint64) (discovery.Member, error)
- func (m *Members) Length() int
- func (m *Members) Range(f func(id uint64, member discovery.Member) bool)
- type RoutingTable
- func (r *RoutingTable) AddCallback(f func())
- func (r *RoutingTable) CheckBootstrap() error
- func (r *RoutingTable) CheckMemberCountQuorum() error
- func (r *RoutingTable) Discovery() *discovery.Discovery
- func (r *RoutingTable) IsBootstrapped() bool
- func (r *RoutingTable) Members() *Members
- func (r *RoutingTable) NumMembers() int32
- func (r *RoutingTable) OwnedPartitionCount() uint64
- func (r *RoutingTable) RegisterOperations(operations map[protocol.OpCode]func(w, r protocol.EncodeDecoder))
- func (r *RoutingTable) SetNumMembersEagerly(nr int32)
- func (r *RoutingTable) Shutdown(ctx context.Context) error
- func (r *RoutingTable) Signature() uint64
- func (r *RoutingTable) Start() error
- func (r *RoutingTable) This() discovery.Member
- func (r *RoutingTable) UpdateEagerly()
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrServerGone = errors.New("server is gone") ErrClusterJoin = errors.New("cannot join the cluster") // ErrOperationTimeout is returned when an operation times out. ErrOperationTimeout = errors.New("operation timeout") )
View Source
var ErrClusterQuorum = neterrors.New(protocol.StatusErrClusterQuorum,
"cannot be reached cluster quorum to operate")
ErrClusterQuorum means that the cluster could not reach a healthy numbers of members to operate.
Functions ¶
This section is empty.
Types ¶
type Members ¶
func (*Members) DeleteByName ¶
type RoutingTable ¶
func New ¶
func New(e *environment.Environment) *RoutingTable
func (*RoutingTable) AddCallback ¶
func (r *RoutingTable) AddCallback(f func())
func (*RoutingTable) CheckBootstrap ¶
func (r *RoutingTable) CheckBootstrap() error
CheckBootstrap is called for every request and checks whether the node is bootstrapped. It has to be very fast for a smooth operation.
func (*RoutingTable) CheckMemberCountQuorum ¶
func (r *RoutingTable) CheckMemberCountQuorum() error
func (*RoutingTable) Discovery ¶
func (r *RoutingTable) Discovery() *discovery.Discovery
func (*RoutingTable) IsBootstrapped ¶
func (r *RoutingTable) IsBootstrapped() bool
func (*RoutingTable) Members ¶
func (r *RoutingTable) Members() *Members
func (*RoutingTable) NumMembers ¶
func (r *RoutingTable) NumMembers() int32
func (*RoutingTable) OwnedPartitionCount ¶
func (r *RoutingTable) OwnedPartitionCount() uint64
func (*RoutingTable) RegisterOperations ¶
func (r *RoutingTable) RegisterOperations(operations map[protocol.OpCode]func(w, r protocol.EncodeDecoder))
func (*RoutingTable) SetNumMembersEagerly ¶
func (r *RoutingTable) SetNumMembersEagerly(nr int32)
func (*RoutingTable) Signature ¶
func (r *RoutingTable) Signature() uint64
func (*RoutingTable) Start ¶
func (r *RoutingTable) Start() error
func (*RoutingTable) This ¶
func (r *RoutingTable) This() discovery.Member
func (*RoutingTable) UpdateEagerly ¶
func (r *RoutingTable) UpdateEagerly()
Click to show internal directories.
Click to hide internal directories.