peeradmission

package
v0.0.0-...-9b85f49 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2026 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Overview

Package peeradmission answers inbound hello requests: it classifies the calling peer by probing it back, and returns a bounded freshest set of reachable peers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MountHello

func MountHello(
	router httpguard.WireRouter,
	identity nodeidentity.Identity,
	exchange HelloExchange,
)

Types

type HelloExchange

type HelloExchange struct {
	Status        RuntimeStatus
	Reachability  ReachableRoster
	Client        *http.Client
	News          NewsIntake
	PreferHTTPS   bool
	NetworkAccess yagoproto.NetworkAccess
}

type NewsIntake

type NewsIntake interface {
	AcceptNewsAttachment(ctx context.Context, encoded string)
}

type ReachableRoster

type ReachableRoster interface {
	FreshestPeers(ctx context.Context, limit int) []yagomodel.Seed
	ObserveCaller(ctx context.Context, caller yagomodel.Seed, classification yagomodel.PeerType)
}

type RuntimeStatus

type RuntimeStatus interface {
	NetworkName(ctx context.Context) string
	SelfSeed(ctx context.Context) yagomodel.Seed
}

Jump to

Keyboard shortcuts

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