volunteercontrol

package
v6.11.0+incompatible Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type VolunteerControl

type VolunteerControl struct {
	AuthSet
	Self      Identity
	Volunteer *messages.VolunteerMessage

	Votes map[Identity]messages.LeaderLevelMessage
}

VolunteerControl will keep a record of all votes for a given volunteer and produce the best vote possible.

func NewVolunteerControl

func NewVolunteerControl(self Identity, authset AuthSet) *VolunteerControl

func (*VolunteerControl) AddVote

addVote just adds the vote to the vote map, and will not act upon it

func (*VolunteerControl) CheckVoteCount

func (v *VolunteerControl) CheckVoteCount() *messages.LeaderLevelMessage

checkVoteCount will check to see if we have enough votes to issue a ranked message. We will not add that message to our votemap, as we may have not chosen to actually send that vote. If we decide to send that vote, we will get it sent back to us

Returns a LeaderLevelMessage with the level set, however it may need adjusting! (Can only adjust it up)

func (*VolunteerControl) Copy

Jump to

Keyboard shortcuts

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