Files
zeekayandHanzo Dev 75b73f4b15 types: the fleet's shared value layer
A value belongs here when two or more services must agree on it exactly and
neither should inherit the other's machinery to do so. The package imports the
standard library only; go list -deps is 63, all stdlib.

Seeded with the metered-series window. Cloud and ai must resolve ?range/?start/
?end to the same [start, end) and the same bucket interval, and cloud reached
that 30-line rule through a package that carries 1925 dependencies.

Interval is a closed type. The bucket function is not bindable in the engines
that serve these series, so the interval reaches a query by interpolation;
ParseWindow yields Hour or Day and nothing else can be constructed through it.

ParseWindow is total: it returns a window or an error, never a zero window a
caller could read as a valid range. It also carries the resolved label, which
every call site previously re-derived.

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-26 19:04:56 -07:00

10 lines
443 B
Go

// Package types holds the values Hanzo services share.
//
// It imports the standard library only, so a service can depend on a value
// without inheriting the machinery of whoever else uses it.
//
// A value earns a place here when two or more services must agree on it
// exactly. Fetching, storing and recording are effects, and an effect belongs
// with the service that owns it, next to the schema or transport it acts on.
package types