Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry tracks cancellation functions for long-lived gRPC streams (e.g. workflow run subscriptions and durable event listeners) so they can be hung up during graceful shutdown. grpc.Server.GracefulStop waits for open streams to finish; without an active hangup, subscriber streams would block shutdown until the process is killed.
func NewRegistry ¶
func NewRegistry() *Registry
func (*Registry) CancelAll ¶
func (r *Registry) CancelAll()
CancelAll cancels every registered session and closes the registry: any session registered afterwards is cancelled immediately. It is called once during shutdown.
func (*Registry) Register ¶
func (r *Registry) Register(cancel context.CancelFunc) (deregister func())
Register adds a stream session's cancel function to the registry and returns a deregister function which the stream handler must defer.