testhelper

package
v6.2.2-rc3+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2019 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 4 more Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthSetHelper

type AuthSetHelper struct {
	AuthSet
	// contains filtered or unexported fields
}

AuthSetHelper will help testing authority sets. Add whatever functions you need to help you manage the authsets in tests

func NewAuthSetHelper

func NewAuthSetHelper(feds, auds int) *AuthSetHelper

func (*AuthSetHelper) AddAudit

func (a *AuthSetHelper) AddAudit() Identity

func (*AuthSetHelper) AddFed

func (a *AuthSetHelper) AddFed() Identity

func (*AuthSetHelper) GetAuthSet

func (a *AuthSetHelper) GetAuthSet() AuthSet

func (*AuthSetHelper) Majority

func (a *AuthSetHelper) Majority() int

func (*AuthSetHelper) NewVoteFactory

func (a *AuthSetHelper) NewVoteFactory(vol VolunteerMessage) *VoteFactory

func (*AuthSetHelper) NextIdentity

func (a *AuthSetHelper) NextIdentity() Identity

type VoteFactory

type VoteFactory struct {
	FedList   []Identity
	Volunteer VolunteerMessage
	// contains filtered or unexported fields
}

func NewVoteFactory

func NewVoteFactory(feds []Identity, vol VolunteerMessage) *VoteFactory

func (*VoteFactory) Majority

func (v *VoteFactory) Majority() int

func (*VoteFactory) NextFed

func (v *VoteFactory) NextFed() Identity

func (*VoteFactory) NextVote

func (v *VoteFactory) NextVote() VoteMessage

func (*VoteFactory) VotesListWithMajority

func (v *VoteFactory) VotesListWithMajority() []VoteMessage

func (*VoteFactory) VotesMapWithMajority

func (v *VoteFactory) VotesMapWithMajority() map[Identity]VoteMessage

Jump to

Keyboard shortcuts

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