glue

package
v0.0.0-...-c15aa5a Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: GPL-3.0, AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Package glue implements the glue structure that ties all the internal subpackages together.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connector

type Connector interface {
	Halt()
	DispatchPacket(*packet.Packet)
	IsValidForwardDest(*[constants.NodeIDLength]byte) bool
	ForceUpdate()
}

type Decoy

type Decoy interface {
	Halt()
	OnNewDocument(*pkicache.Entry)
	OnPacket(*packet.Packet)
}

type Glue

type Glue interface {
	Config() *config.Config
	LogBackend() *log.Backend
	IdentityKey() *eddsa.PrivateKey
	LinkKey() *ecdh.PrivateKey

	Management() *thwack.Server
	MixKeys() MixKeys
	PKI() PKI
	Provider() Provider
	Scheduler() Scheduler
	Connector() Connector
	Listeners() []Listener
	Decoy() Decoy

	ReshadowCryptoWorkers()
}

Glue is the structure that binds the internal components together.

type Listener

type Listener interface {
	Halt()
	IsConnUnique(interface{}) bool
	OnNewSendRatePerMinute(uint64)
	OnNewSendBurst(uint64)
}

type MixKeys

type MixKeys interface {
	Halt()
	Generate(uint64) (bool, error)
	Prune() bool
	Get(uint64) (*ecdh.PublicKey, bool)
	Shadow(map[uint64]*mixkey.MixKey)
}

type PKI

type PKI interface {
	Halt()
	StartWorker()
	OutgoingDestinations() map[[constants.NodeIDLength]byte]*pki.MixDescriptor
	AuthenticateConnection(*wire.PeerCredentials, bool) (*pki.MixDescriptor, bool, bool)
	GetRawConsensus(uint64) ([]byte, error)
	Now() (epoch uint64, ellapsed time.Duration, till time.Duration, err error)
}

type Provider

type Provider interface {
	Halt()
	UserDB() userdb.UserDB
	Spool() spool.Spool
	AuthenticateClient(*wire.PeerCredentials) bool
	OnPacket(*packet.Packet)
	KaetzchenForPKI() (map[string]map[string]interface{}, error)
	AdvertiseRegistrationHTTPAddresses() []string
}

type Scheduler

type Scheduler interface {
	Halt()
	OnNewMixMaxDelay(uint64)
	OnPacket(*packet.Packet)
}

Jump to

Keyboard shortcuts

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