Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultGossipInterval is the default interval for gossip messages DefaultGossipInterval = 200 * time.Millisecond // DefaultGossipNodes is the default number of nodes to gossip to DefaultGossipNodes = 3 // DefaultPushPullInterval is the default interval for push/pull sync DefaultPushPullInterval = 30 * time.Second // DefaultLeaveTimeout is the default timeout for leave announcements DefaultLeaveTimeout = 5 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Memberlist ¶
type Memberlist struct {
// contains filtered or unexported fields
}
Memberlist wraps dskit's memberlist gossip service with lifecycle management
func NewMemberlist ¶
func NewMemberlist(nodeID, clusterAddr string, seeds []string, logger log.Logger, reg prometheus.Registerer) (*Memberlist, error)
NewMemberlist creates a new memberlist gossip service.
func (*Memberlist) Client ¶
func (m *Memberlist) Client() kv.Client
Client returns the KV client interface for use with dskit ring
func (*Memberlist) GetKV ¶
func (m *Memberlist) GetKV() *memberlist.KV
GetKV returns the underlying memberlist KV for direct access
func (*Memberlist) Start ¶
func (m *Memberlist) Start(ctx context.Context) error
Start starts the memberlist KV service
func (*Memberlist) Stop ¶
func (m *Memberlist) Stop(ctx context.Context) error
Stop stops the memberlist KV service. Uses dskit's built-in service state to handle cleanup correctly: - New state: call Stop() - dskit handles never-started services correctly - Failed state: skip Stop() - dskit would try to create new transport for leave messages - Running state: call Stop() normally for graceful shutdown
Click to show internal directories.
Click to hide internal directories.