Documentation
¶
Index ¶
Constants ¶
View Source
const ( LowWaterMark = 100 HighWaterMark = 400 ConnGracePeriod = 1 * time.Minute )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
ControlPlaneURL string
ListenAddrs []string
ExternalAddrs []string
KeysSyncInterval time.Duration
LeaseRenewInterval time.Duration
OIDCProvider string // For OIDC enrollment
OIDCToken string // OIDC JWT token for enrollment
BootstrapToken string // Pre-shared bootstrap token for enrollment
BootstrapTokenPath string // File path containing pre-shared bootstrap token
JWTPath string // File path containing OIDC JWT token
KeysDBPath string // Path to save peer private key
AllowLoopback bool
BiscuitTimeout time.Duration
LogVerbose bool
DHTProviderAddrTTL time.Duration
DHTMaxRecordAge time.Duration
// RequiredRole restricts enrollment and startup to only accept tokens containing this role.
RequiredRole string
}
Options holds configuration details for the sam-router.
type Router ¶
type Router struct {
Host host.Host
DHT *dht.IpfsDHT
PubSub *pubsub.PubSub
EventTopic *pubsub.Topic
// contains filtered or unexported fields
}
Router represents a libp2p bootstrap/relay node.
func (*Router) HandleAuthHandshake ¶
HandleAuthHandshake processes incoming auth connections. It is part of mutual auth: 1. Receives client's Biscuit. 2. Verifies it against CP public keys. 3. Responds with success and the router's own Biscuit.
func (*Router) RefreshEnrollment ¶
RefreshEnrollment trades the expiring biscuit token for a new one using a cryptographic challenge.
Click to show internal directories.
Click to hide internal directories.