
proxytest
Package proxytest provides cross-package test helpers for the proxy package. Importing it from production code is not supported.
Index
func NewManager
NewManager builds a *proxy.BackendManager from cfg. Kept as a helper so cross-package call sites stay grouped under a single import even though the underlying constructor is a one-liner.
type Workers
Workers bundles every worker plus the drain manager that a test might need to poke after BuildWorkers has wired the manager. The drain manager is also installed on the supplied *proxy.BackendManager via WireDrain so eligibility filters and write-path drain checks see the live drain state, matching what di.WireManager does in production.
func BuildWorkers
BuildWorkers constructs every worker (rebalancer, replicator, …) plus the drain manager backed by the supplied metadata store, and wires the drain manager onto mgr. Production code resolves workers through DI; this helper exists so mock-based cross-package tests can construct an equivalent fully-wired set without re-implementing each worker’s narrow ops surface. Callers that only need the wiring side effect (drain.Manager attached to mgr) may ignore the return value.
Generated by gomarkdoc