election

package
v0.0.0-...-0a277a6 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2015 License: GPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	C chan bool
	// contains filtered or unexported fields
}

func NewManager

func NewManager(_myId string, _members []string) *Manager

func (*Manager) Current

func (self *Manager) Current() (string, error)

func (*Manager) GetContender

func (self *Manager) GetContender() (string, int64, error)

func (*Manager) Invalidate

func (self *Manager) Invalidate(member string)

func (*Manager) NextView

func (self *Manager) NextView()

func (*Manager) ProcessVote

func (self *Manager) ProcessVote(from, peerId string, viewId int64) error

func (*Manager) View

func (self *Manager) View() int64

func (*Manager) VoteCount

func (self *Manager) VoteCount() int

type Vote

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

func (*Vote) GetIndex

func (self *Vote) GetIndex() string

type Votes

type Votes map[string]Vote

Jump to

Keyboard shortcuts

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