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

operations

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package operations provides bounded admission, request deadlines, health, and SLO snapshots for the Runtime's public execution paths.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrOverloaded = errors.New("runtime admission queue is full")
	ErrDraining   = errors.New("runtime is draining")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	MaxInflight       int
	MaxQueue          int
	AdmissionWait     time.Duration
	RequestTimeout    time.Duration
	LatencySampleSize int
}

type Gate

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

func NewGate

func NewGate(cfg Config, instance string) *Gate

func (*Gate) Acquire

func (g *Gate) Acquire(ctx context.Context) (context.Context, func(bool), error)

func (*Gate) Drain

func (g *Gate) Drain()

func (*Gate) Health

func (g *Gate) Health(version string) operationsv1.HealthSnapshot

func (*Gate) RecordDroppedEvents

func (g *Gate) RecordDroppedEvents(count int64)

RecordDroppedEvents records actual event delivery loss. Admission rejection is tracked independently and must never be reported as an event loss.

func (*Gate) SLO

func (g *Gate) SLO() operationsv1.SLOSnapshot

func (*Gate) StreamInterceptor

func (g *Gate) StreamInterceptor() grpc.StreamServerInterceptor

func (*Gate) UnaryInterceptor

func (g *Gate) UnaryInterceptor() grpc.UnaryServerInterceptor

func (*Gate) WrapHTTP

func (g *Gate) WrapHTTP(next http.Handler) http.Handler

Jump to

Keyboard shortcuts

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