
The highest tagged major version is
v2.
package
Version:
v1.1.2-beta
Opens a new window with list of versions in this module.
Published: Dec 2, 2023
License: MIT
Opens a new window with license information.
Imports: 13
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Election struct {
RoleCh chan role.Role
}
Election for leader node election
New returns a new Election
Run start election process
func (e *Election) Stopped() chan struct{}
Manager is election cycle manager
NewManager returns a new manager
func (m *Manager) Stopped() chan struct{}
Option is function of set election
OptionNode sets election node
OptionTTL sets election ttl
Source Files
¶
Click to show internal directories.
Click to hide internal directories.