elect

package
v0.0.0-...-233725d Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Elector

type Elector struct {
	// contains filtered or unexported fields
}

Elector used to elect a leader

func NewElector

func NewElector(cfg *conf.Elector, worker *consistenthashing.Executor) *Elector

NewElector returns a new Elector instance.

func (*Elector) ElectLeader

func (e *Elector) ElectLeader(participator string, stopGroup *sync.WaitGroup, stopCh chan struct{})

ElectLeader elects a new leader.

Jump to

Keyboard shortcuts

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