Documentation ¶
Index ¶
- Constants
- func BytesToUint32(data []byte) (ret uint32, err error)
- func Uint32ToBytes(val uint32) []byte
- type AuthSet
- func (a *AuthSet) Add(id Identity, status int) int
- func (a *AuthSet) AddHash(id interfaces.IHash, status int) int
- func (a AuthSet) Copy() AuthSet
- func (a *AuthSet) FedIDtoIndex(id Identity) int
- func (a *AuthSet) GetAuds() []Identity
- func (a *AuthSet) GetFeds() []Identity
- func (a *AuthSet) GetVolunteerPriority(vol Identity) int
- func (a *AuthSet) Hash() Hash
- func (a *AuthSet) IsLeader(id Identity) bool
- func (a *AuthSet) Majority() int
- func (a *AuthSet) New()
- func (r *AuthSet) ReadString(s string)
- func (a *AuthSet) Sort()
- func (r *AuthSet) String() string
- func (a *AuthSet) VMForIdentity(id Identity, location MinuteLocation) int
- type AuthorityStatus
- type Hash
- type Identity
- type MinuteLocation
- type ProcessListLocation
Constants ¶
View Source
const (
NumberOfMinutes int = 10
)
Variables ¶
This section is empty.
Functions ¶
func BytesToUint32 ¶
func Uint32ToBytes ¶
Types ¶
type AuthSet ¶
type AuthSet struct { IdentityList []Identity StatusArray []int IdentityMap map[Identity]int PriorityMap map[Identity]int PriorityToIdentityMap map[int]Identity }
func NewAuthSet ¶
func NewAuthSet() *AuthSet
func (*AuthSet) FedIDtoIndex ¶
func (*AuthSet) GetVolunteerPriority ¶
func (*AuthSet) ReadString ¶
func (*AuthSet) VMForIdentity ¶
func (a *AuthSet) VMForIdentity(id Identity, location MinuteLocation) int
type AuthorityStatus ¶
type AuthorityStatus int
--------------------------------------------------------------------------------------------------------------------
func (*AuthorityStatus) MarshalJSON ¶
func (i *AuthorityStatus) MarshalJSON() (rval []byte, err error)
func (*AuthorityStatus) ReadString ¶
func (a *AuthorityStatus) ReadString(s string)
func (*AuthorityStatus) String ¶
func (s *AuthorityStatus) String() string
func (*AuthorityStatus) UnmarshalJSON ¶
func (i *AuthorityStatus) UnmarshalJSON(data []byte) error
type Hash ¶
func (*Hash) ReadString ¶
type Identity ¶
type Identity [32]byte
func NewIdentityFromInt ¶
func (*Identity) MarshalJSON ¶
func (*Identity) ReadString ¶
func (*Identity) UnmarshalJSON ¶
type MinuteLocation ¶
func (*MinuteLocation) ReadString ¶
func (p *MinuteLocation) ReadString(s string)
func (*MinuteLocation) String ¶
func (p *MinuteLocation) String() string
func (*MinuteLocation) Sum ¶
func (m *MinuteLocation) Sum() int
type ProcessListLocation ¶
type ProcessListLocation struct { Vm int MinuteLocation }
func (*ProcessListLocation) ReadString ¶
func (p *ProcessListLocation) ReadString(s string)
func (*ProcessListLocation) String ¶
func (p *ProcessListLocation) String() string
Click to show internal directories.
Click to hide internal directories.