routingtable

package
v0.5.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 4, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

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 = errors.New("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

type Members struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*Members) Add

func (m *Members) Add(member discovery.Member)

func (*Members) Delete

func (m *Members) Delete(id uint64)

func (*Members) DeleteByName

func (m *Members) DeleteByName(other discovery.Member)

func (*Members) Get

func (m *Members) Get(id uint64) (discovery.Member, error)

func (*Members) Length

func (m *Members) Length() int

func (*Members) Range

func (m *Members) Range(f func(id uint64, member discovery.Member) bool)

type RoutingTable

type RoutingTable struct {
	sync.RWMutex // routingMtx
	// contains filtered or unexported fields
}

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) RegisterHandlers added in v0.5.0

func (r *RoutingTable) RegisterHandlers()

func (*RoutingTable) SetNumMembersEagerly

func (r *RoutingTable) SetNumMembersEagerly(nr int32)

func (*RoutingTable) Shutdown

func (r *RoutingTable) Shutdown(ctx context.Context) error

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()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL