Documentation
¶
Overview ¶
Package gate admits internal API calls only while the author's tree is up: before it started they get Unavailable, and stopping waits for the calls in flight before the tree (and its dependencies) stops. When the stop budget runs out first, the contexts of the calls still running are cancelled, so a long stream ends instead of outliving the tree. Health is never gated.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Gate ¶
type Gate struct {
// contains filtered or unexported fields
}
Gate tracks admitted calls.
func (*Gate) Close ¶
Close stops admitting and waits for admitted calls within ctx. When ctx ends first, it cancels the contexts of the calls still running and reports them.
func (*Gate) ServerOptions ¶
func (g *Gate) ServerOptions() []grpc.ServerOption
ServerOptions installs the gate on a gRPC server.
Click to show internal directories.
Click to hide internal directories.