extensionvalue

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package extensionvalue shares the bounded canonical value boundary used by metadata and settings. The public contract descriptor is the schema source.

Index

Constants

View Source
const MaxBatchBytes = 4 << 20
View Source
const MaxBytes = 256 << 10

Variables

View Source
var ErrBatchLimit = safeerror.NewFault(fault.Conflict, "model extension JSON batch exceeds its byte limit")

ErrBatchLimit reports a batch retaining more than MaxBatchBytes of JSON. It matches fault.Conflict; slot loading retries such a batch in smaller parts.

Functions

func Decode

func Decode[V any](ctx context.Context, schema contract.JSON[V], snapshot value.JSON[json.RawMessage]) (V, error)

func Encode

func Encode[V any](ctx context.Context, schema contract.JSON[V], input V) (value.JSON[json.RawMessage], error)

func Limits

func Limits() contract.JSONLimits

Types

type BatchBudget

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

BatchBudget bounds retained JSON across a streamed result. A caller returns no partial result when this fails; one individually bounded row is decoded at a time by the ordinary query API.

func (*BatchBudget) Add

func (b *BatchBudget) Add(snapshot value.JSON[json.RawMessage]) error

Jump to

Keyboard shortcuts

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