types

package
v0.0.0-...-b5a4de9 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FederationConfig

type FederationConfig struct {
	Peers []PeerConfig `yaml:"peers"`
}

type Peer

type Peer struct {
	Config PeerConfig
	Mu     *sync.Mutex
	Conn   *grpc.ClientConn

	LastComms time.Time
}

type PeerConfig

type PeerConfig struct {
	ID      uuid.UUID         `yaml:"id"`
	Name    string            `yaml:"name"`
	Address string            `yaml:"addr"`
	PubKey  ed25519.PublicKey `yaml:"pubkey"`
}

type PeerRuntime

type PeerRuntime struct {
	Cfg        PeerConfig
	Mu         sync.RWMutex
	Conn       *grpc.ClientConn
	Client     fedpb.FederationClient
	Handshaken bool
	LastSeen   time.Time
	Online     bool
}

type PendingMsg

type PendingMsg struct {
	MessageID uuid.UUID
	From      uuid.UUID
	To        uuid.UUID
	Payload   *common.EncryptedEnvelope
	Created   time.Time
	Attempts  int
}

Jump to

Keyboard shortcuts

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