modelview

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: 6 Imported by: 0

Documentation

Overview

Package modelview holds cycle-free aggregate request model-view identity: config generation/fingerprint, registry generation, catalog generation, and a stable digest for diagnostics and /v1/models ETag (req 9.6).

It must not import modelregistry, modelcatalog, runtimehost, or stdhttp so composition roots can attach one identity alongside package-native BoundViews without creating package cycles.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithIdentity

func WithIdentity(ctx context.Context, id Identity) context.Context

WithIdentity attaches the aggregate model-view identity to ctx.

Types

type Identity

type Identity struct {
	ConfigGeneration   int64
	ConfigFingerprint  string
	RegistryGeneration string
	CatalogGeneration  string
	Digest             string
}

Identity is the aggregate request model-view identity: config generation, registry generation, catalog generation, and a stable digest (req 9.6). It carries no secrets, raw config, or connection material.

func Derive

func Derive(configGen int64, configFP, registryGen, catalogGen string) Identity

Derive builds a stable Identity from safe generation fields.

func FromContext

func FromContext(ctx context.Context) (Identity, bool)

FromContext returns the request-bound aggregate identity when present.

func (Identity) QuotedETag

func (id Identity) QuotedETag() string

QuotedETag returns a safely quoted ETag from the digest, or empty when unset.

func (Identity) SafeFields

func (id Identity) SafeFields() map[string]string

SafeFields returns operator-safe diagnostic fields (no secrets).

Jump to

Keyboard shortcuts

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