identity

package
v4.3.4 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2022 License: BSD-2-Clause, BSD-2-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TrackerListKey     = "TrackerListKey"
	TrackerListVersion = 0
	TimestampKey       = "IDTrackingTimestamp"

	// DefaultExtraChecks is the default value for ExtraChecks
	// on receptionID.Identity.
	DefaultExtraChecks = 5

	// NetworkRetention is how long messages are
	// retained on the network
	NetworkRetention = 500 * time.Hour

	// GenerationDelta is how far into the past
	// to go in order to ensure all relevant
	// ephemeral identities are generated
	GenerationDelta = time.Duration(ephemeral.Period) + (5 * time.Second)
)

Variables

View Source
var Forever = time.Time{}

Functions

This section is empty.

Types

type TrackedID

type TrackedID struct {
	NextGeneration time.Time
	LastGeneration time.Time
	Source         *id.ID
	ValidUntil     time.Time
	Persistent     bool
	Creation       time.Time
}

type Tracker

type Tracker interface {
	StartProcesses() stoppable.Stoppable
	AddIdentity(id *id.ID, validUntil time.Time, persistent bool)
	AddIdentityWithHistory(id *id.ID, validUntil, beginning time.Time, persistent bool)
	RemoveIdentity(id *id.ID)
	ForEach(n int, rng io.Reader, addressSize uint8,
		operator func([]receptionID.IdentityUse) error) error
	GetIdentity(get *id.ID) (TrackedID, error)
}

func NewOrLoadTracker

func NewOrLoadTracker(session storage.Session, addrSpace address.Space) Tracker

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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