gate/v1

What admits requests on a multisite host before an instance is served here or forwarded to another server: a peer allow list, the real client IP behind a proxy, rate limits. Gates run in order and every one must admit; a gate may answer the request itself (429, 403).

A host-scope service contract, many providers in order (gate.go).

Use

Nothing to call: the host runs every gate on every request. Pick or order them in pocketone.yaml:

providers:
  gate/v1: [firewall]

Provide

Implement gatev1.Gate (AllowPeer before routing, Admit per instance, returning a release function), and gatev1.ClientIPResolver if the gate knows the real client. Provide it in a host extension's RegisterHost:

gatev1.Contract.ProvideIn(h.Scope, myGate)

Extensions

Extension
firewall provides

License

MIT