deterministic

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deterministic

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

Deterministic Round robin leader selection is a fair and sequential leader selection. Each instance/ round change the next leader is selected one-by-one.

func New

func New(seed []byte, operatorIDs []uint64) (*Deterministic, error)

New returns a new Deterministic instance or error

func (*Deterministic) Calculate

func (rr *Deterministic) Calculate(round uint64) uint64

Calculate returns the current leader

Jump to

Keyboard shortcuts

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