network

package
v0.0.0-...-3a733ff Latest Latest
Warning

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

Go to latest
Published: May 24, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseNetwork

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

func NewNetwork

func NewNetwork(peers map[peerpb.PeerID]peer.Protocol, failures, runTicks int) BaseNetwork

func (*BaseNetwork) Alive

func (n *BaseNetwork) Alive(p peer.Protocol) bool

func (*BaseNetwork) Crash

func (n *BaseNetwork) Crash(id peerpb.PeerID) peer.Protocol

func (*BaseNetwork) CrashN

func (n *BaseNetwork) CrashN(c int, except peerpb.PeerID)

func (*BaseNetwork) Delay

func (n *BaseNetwork) Delay(from, to peerpb.PeerID)

func (*BaseNetwork) F

func (n *BaseNetwork) F() int

func (*BaseNetwork) RunNetwork

func (n *BaseNetwork) RunNetwork(goal func(p peer.Protocol) bool, quorum bool) bool

runNetwork waits until the given goal for an epaxos node has been completed. If quorum is true, it will wait until the goal is completed on a quorum of nodes. If it is false, it will wait until the goal is completed on all nodes.

func (*BaseNetwork) UnDelay

func (n *BaseNetwork) UnDelay(from, to peerpb.PeerID)

type Network

type Network interface {
}

Jump to

Keyboard shortcuts

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