Documentation ¶
Index ¶
- Variables
- type EphemeralIdentity
- type Identity
- type IdentityUse
- type Store
- func (s *Store) AddIdentity(identity Identity) error
- func (s *Store) ForEach(n int, rng io.Reader, addressSize uint8, operate func([]IdentityUse) error) error
- func (s *Store) RemoveIdentities(source *id.ID)
- func (s *Store) RemoveIdentity(ephID ephemeral.Id)
- func (s *Store) SetToExpire(addressSize uint8)
Constants ¶
This section is empty.
Variables ¶
View Source
var InvalidRequestedNumIdentities = errors.New("cannot get less than one identity(s)")
Functions ¶
This section is empty.
Types ¶
type EphemeralIdentity ¶
func BuildIdentityFromRound ¶
func BuildIdentityFromRound(source *id.ID, round rounds.Round) EphemeralIdentity
BuildIdentityFromRound returns an EphemeralIdentity that the source would use to receive messages from the given round
type Identity ¶
type Identity struct { // Identity EphemeralIdentity AddressSize uint8 // Usage variables End time.Time // Timestamp when active polling will stop ExtraChecks uint // Number of extra checks executed as active after the // Polling parameters StartValid time.Time // Timestamp when the ephID begins being valid EndValid time.Time // Timestamp when the ephID stops being valid // Makes the identity not store on disk Ephemeral bool // When this identity expired, it will auto add processNext to the identity list // to be processed. In practice this is a reverse ordered list and is added whenever // many identities are added at once in order to pick up sequentially ProcessNext *Identity }
type IdentityUse ¶
type IdentityUse struct { Identity // Denotes if the identity is fake, in which case we do not process messages Fake bool UR *store.UnknownRounds ER *store.EarliestRound CR *store.CheckedRounds }
func (IdentityUse) GoString ¶
func (iu IdentityUse) GoString() string
GoString returns a string representations of all the values in the IdentityUse. This function adheres to the fmt.GoStringer interface.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func NewOrLoadStore ¶
NewOrLoadStore creates a new reception store that starts empty.
func (*Store) AddIdentity ¶
func (*Store) ForEach ¶
func (s *Store) ForEach(n int, rng io.Reader, addressSize uint8, operate func([]IdentityUse) error) error
ForEach operates on 'n' identities randomly in a random order. if no identities exist, it will operate on a single fake identity
func (*Store) RemoveIdentities ¶
func (*Store) RemoveIdentity ¶
func (*Store) SetToExpire ¶
Click to show internal directories.
Click to hide internal directories.