Documentation
¶
Overview ¶
Package community owns the native pull-only peer cache. Signed gossip and live reachability have independent lifetimes and are never imported into directory trust.
Index ¶
- Constants
- type Pool
- func (p *Pool) Candidates(scope Scope) []relayplan.Candidate
- func (p *Pool) Close()
- func (p *Pool) RecordOriginForbidden(scope Scope, identity string)
- func (p *Pool) Refresh(ctx context.Context, scope Scope, seeds Seeds)
- func (p *Pool) STUN(generation uint64) []icepolicy.Endpoint
- func (p *Pool) Transport() *http.Client
- func (p *Pool) Verify(ctx context.Context, scope Scope, identity string) error
- type Scope
- type Seeds
Constants ¶
const (
RefreshInterval = 2 * time.Minute
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
func New ¶
func New(path string, policy publicdial.Policy, now func() time.Time, sink diagnostics.Sink) *Pool
func (*Pool) Close ¶
func (p *Pool) Close()
Close aborts pool-owned refreshes and probes and joins their goroutines before releasing idle HTTP connections.
func (*Pool) RecordOriginForbidden ¶
RecordOriginForbidden invalidates cached relay verification for scope and applies origin-scoped rejected backoff when a real relay dial receives HTTP 403 after background warming. Other frontend origins and origin-independent STUN observations remain unaffected.
func (*Pool) Refresh ¶
Refresh coalesces startup bootstrapping and periodic pool maintenance. Shared I/O runs on the pool lifetime context so caller cancellation only unblocks that caller's wait without poisoning coalesced refreshers or probes.