streams

package
v0.89.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2026 License: MIT Imports: 3 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL