compatible

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package compatible wires generation-local per-instance compatible backend concurrency limits into the attempt authority coordinator.

Index

Constants

View Source
const (
	ProviderID = "compatible-admission"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AttemptProvider

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

AttemptProvider enforces per-compatible-instance limits at the backend-attempt seam.

func NewAttemptProvider

func NewAttemptProvider(rt *Runtime) *AttemptProvider

NewAttemptProvider returns a provider backed by rt. Nil rt is a no-op provider.

func (*AttemptProvider) AdmitAttempt

func (*AttemptProvider) ReleaseAttempt

func (p *AttemptProvider) ReleaseAttempt(_ context.Context, in authority.AttemptRelease) error

func (*AttemptProvider) SettleAttempt

type Limits

type Limits map[string]int

Limits maps runtime backend instance IDs to positive max concurrent requests.

type Runtime

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

Runtime holds generation-local compatible admission state.

func AttemptRegistration

func AttemptRegistration(limits Limits, store concurrencyapp.LeaseStore) (authority.AttemptRegistration, *Runtime, error)

AttemptRegistration returns a descriptor-bound attempt registration for limits.

func NewRuntime

func NewRuntime(limits Limits, store concurrencyapp.LeaseStore) (*Runtime, error)

NewRuntime constructs an immutable compatible admission runtime for one generation. store is the generation-local lease persistence port (wired from infra at composition).

Jump to

Keyboard shortcuts

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