Versions in this module Expand all Collapse all v1 v1.0.0 Jan 8, 2021 Changes in this version + var ErrIDExists = errors.New("membership: ID exists") + var ErrIDNotFound = errors.New("membership: ID not found") + var ErrIDRemoved = errors.New("membership: ID removed") + var ErrPeerURLexists = errors.New("membership: peerURL exists") + var StoreMembersPrefix = path.Join(storePrefix, "members") + func MemberAttributesStorePath(id types.ID) string + func MemberStoreKey(id types.ID) string + func MustParseMemberIDFromKey(key string) types.ID + func RemovedMemberStoreKey(id types.ID) string + func StoreClusterVersionKey() string + func ValidateClusterAndAssignIDs(local *RaftCluster, existing *RaftCluster) error + type Attributes struct + ClientURLs []string + Name string + type Member struct + ID types.ID + func NewMember(name string, peerURLs types.URLs, clusterName string, now *time.Time) *Member + func (m *Member) Clone() *Member + func (m *Member) IsStarted() bool + func (m *Member) PickPeerURL() string + type MembersByID []*Member + func (ms MembersByID) Len() int + func (ms MembersByID) Less(i, j int) bool + func (ms MembersByID) Swap(i, j int) + type MembersByPeerURLs []*Member + func (ms MembersByPeerURLs) Len() int + func (ms MembersByPeerURLs) Less(i, j int) bool + func (ms MembersByPeerURLs) Swap(i, j int) + type RaftAttributes struct + PeerURLs []string + type RaftCluster struct + func NewCluster(token string) *RaftCluster + func NewClusterFromMembers(token string, id types.ID, membs []*Member) *RaftCluster + func NewClusterFromURLsMap(token string, urlsmap types.URLsMap) (*RaftCluster, error) + func (c *RaftCluster) AddMember(m *Member) + func (c *RaftCluster) ClientURLs() []string + func (c *RaftCluster) ID() types.ID + func (c *RaftCluster) IsIDRemoved(id types.ID) bool + func (c *RaftCluster) IsReadyToAddNewMember() bool + func (c *RaftCluster) IsReadyToRemoveMember(id uint64) bool + func (c *RaftCluster) Member(id types.ID) *Member + func (c *RaftCluster) MemberByName(name string) *Member + func (c *RaftCluster) MemberIDs() []types.ID + func (c *RaftCluster) Members() []*Member + func (c *RaftCluster) PeerURLs() []string + func (c *RaftCluster) Recover(onSet func(*semver.Version)) + func (c *RaftCluster) RemoveMember(id types.ID) + func (c *RaftCluster) SetBackend(be backend.Backend) + func (c *RaftCluster) SetID(id types.ID) + func (c *RaftCluster) SetStore(st store.Store) + func (c *RaftCluster) SetVersion(ver *semver.Version, onSet func(*semver.Version)) + func (c *RaftCluster) String() string + func (c *RaftCluster) UpdateAttributes(id types.ID, attr Attributes) + func (c *RaftCluster) UpdateRaftAttributes(id types.ID, raftAttr RaftAttributes) + func (c *RaftCluster) ValidateConfigurationChange(cc raftpb.ConfChange) error + func (c *RaftCluster) Version() *semver.Version Incompatible versions in this module v3.3.27+incompatible Aug 25, 2020