Help us shape the future of Go! Take the 2026 Go Developer Survey

serving

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package serving coordinates module adapters without exposing continuation ownership or verified state through the public library API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Epoch

type Epoch struct {
	// contains filtered or unexported fields
}

Epoch identifies one server lifetime. A replacement server uses New again.

func FromContext

func FromContext(ctx context.Context) *Epoch

FromContext returns nil for direct in-process calls.

func New

func New() *Epoch

New creates an independent serving lifetime.

func (*Epoch) Close

func (e *Epoch) Close()

Close invalidates this lifetime and releases its retained confirmations.

func (*Epoch) Closed

func (e *Epoch) Closed() bool

Closed reports shutdown. A nil epoch is the direct in-process lifetime.

func (*Epoch) Context

func (e *Epoch) Context(ctx context.Context) context.Context

Context binds calls to this lifetime without replacing their cancellation scope.

func (*Epoch) Observe

func (e *Epoch) Observe(owner any, cleanup func()) bool

Observe installs one bounded cleanup callback per registry using this epoch.

Jump to

Keyboard shortcuts

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