Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Capabilities ¶
type Capabilities struct {
CollectionMode CollectionMode
SampleInterval time.Duration
Retention time.Duration
MinimumStep time.Duration
MaximumRange time.Duration
MaximumPoints int
MaximumSeries int
MaximumTotalPoints int
Metrics []Metric
}
Capabilities contains only backend-neutral facts safe to expose through a future public capability response. Backend names, endpoints, credentials and tenant identity are deliberately absent.
func (Capabilities) Durable ¶
func (c Capabilities) Durable() bool
func (Capabilities) Validate ¶
func (c Capabilities) Validate() error
type CollectionMode ¶
type CollectionMode string
const ( CollectionOnRead CollectionMode = "on_read" CollectionPeriodic CollectionMode = "periodic" )
type CoveragePoint ¶
type Point ¶
type Point struct {
Start, End time.Time
FirstObservedAt, LastObservedAt time.Time
ObservationCount int
CPUContributorCount int
MemoryContributorCount int
CPUUtilizationRatio, CPUCapacityCores *float64
MemoryUsageBytes, MemoryLimitBytes *uint64
}
Point represents one server-selected bucket. CPUUtilizationRatio is derived from ordered cumulative counters within this Series' allocation; a counter regression resets the rate baseline. A provider without cumulative CPU time (E2B) reports utilization directly, and the bucket holds the mean of those reports. Memory values are the final observed values in the bucket.
type Response ¶
type Response struct {
Capabilities
Scope
Requested Range
Resolution time.Duration
GeneratedAt time.Time
RetainedFrom *time.Time
Coverage []CoveragePoint
Series []Series
TokenUsage []TokenUsagePoint
}
type Result ¶
type Result struct {
GeneratedAt time.Time
RetainedFrom *time.Time
Coverage []CoveragePoint
Series []Series
TokenUsage []TokenUsagePoint
}
Result is returned by a backend Reader before the service validates identity, ordering, bounds and values. Empty retained ranges and missing metric values remain explicit; a Reader must never synthesize zeroes for absent samples.
type ScopeResolver ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(resolver ScopeResolver, reader Reader) (*Service, error)
func (*Service) Capabilities ¶
func (s *Service) Capabilities() Capabilities
func (*Service) QuerySession ¶
func (s *Service) QuerySession(ctx context.Context, tenantID, sessionID string, requested Range) (Response, error)
QuerySession resolves authenticated Core ownership before issuing any backend request. The history Reader receives only Core identity and bounded range data; provider-native identity is never an authority-bearing input.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package postgresreader stores and reads bounded periodic Runtime telemetry.
|
Package postgresreader stores and reads bounded periodic Runtime telemetry. |