Documentation
¶
Overview ¶
Package proxy implements cross-domain NACK proxying for retry-endpoint.
When a retry-endpoint serving a downstream multicast domain misses a frame in its cache, it recovers the frame from an upstream retry-endpoint that received the frame directly from the proxy (independent of the bridge that dropped it), re-caches it, and multicast-retransmits it into the downstream domain. The downstream consumer's gap then auto-fills.
Recovery is asynchronous ("cache-warm"): the server returns MISS immediately and enqueues a job here; no NACK worker is held. Because the downstream proxy is not joined to the upstream shard groups, the recovered frame must return by unicast — the upstream endpoint must run with unicast retransmit enabled (proxied NACKs are always served a unicast copy; see the server).
Proxied NACKs carry FlagProxied so an upstream endpoint never re-proxies them, bounding any chain to a single hop.
Index ¶
Constants ¶
const ( // FlagProxied marks a NACK (Flags byte, offset 7) as recovered on behalf // of a downstream domain. An endpoint receiving a NACK with this bit set // MUST NOT re-proxy it, bounding the chain to one hop (BRC-126). FlagProxied byte = 0x01 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client recovers missed frames from upstream retry-endpoints.
func New ¶
New constructs a Client. Cache and Retrans must be non-nil; Upstreams must be non-empty (validated by config).
type Config ¶
type Config struct {
Upstreams []string // upstream NACK targets (host:port)
Timeout time.Duration
MaxEndpoints int // upstream endpoints tried per gap; <=0 = all
DedupWindow time.Duration
Workers int
QueueDepth int
Dedup Deduper // may be nil (no cross-instance in-flight dedup)
Cache Cache
Retrans Retransmitter
TTLs TTLConfig
Rec *metrics.Recorder
}
Config holds the proxy client's dependencies and tuning.
type Retransmitter ¶
Retransmitter multicasts a recovered frame into the downstream domain.