dive

package
v6.6.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2020 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 4 more Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MirrorMap Mirrors

Functions

func CloneElection

func CloneElection(src *election.Election) *election.Election

func Dive

func Dive(mList []*DirectedMessage, leaders []*election.Election, depth int, limit int, msgPath []*DirectedMessage) (limitHit bool, leaf bool, seeSuccess bool)

dive Pass a list of messages to process, to a set of leaders, at a current depth, with a particular limit. Provided a msgPath, and updated for recording purposes. Returns limitHit -- path hit the limit, and recursed. Can happen on loops leaf -- All messages were processed, and no message resulted in a change of state. seeSuccess -- Some path below this dive produced a solution Note that we actually dive 100 levels beyond our limit, and declare seeSuccess past our limit as proof we are in a loop. Hitting the limit and seeSuccess is proof of a loop that none the less can resolve.

func LoopingDetected

func LoopingDetected(global *election.Display) int

LoopingDetected will the number of looping leaders

func Main

func Main()

================ main =================

func SetGlobals

func SetGlobals(r int, rf int, p int, g int)

func Sha

func Sha(p []byte) [32]byte

Create a Sha256 Hash from a byte array

Types

This section is empty.

Jump to

Keyboard shortcuts

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