lifecycle

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: Apache-2.0 Imports: 22 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package lifecycle provides lifecycle data collection functionality for FODC agent.

Index

Constants

View Source
const (
	// DefaultReportDir is the default directory for lifecycle report files.
	DefaultReportDir = "/tmp/lifecycle-reports"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

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

Collector collects lifecycle data from local files.

func NewCollector

func NewCollector(log *logger.Logger, grpcAddr, registryAddr, reportDir string, cacheTTL time.Duration) *Collector

NewCollector creates a new lifecycle data collector. grpcAddr is the local node's lifecycle port (InspectAll + NodeSchemaState, the node's cache view); registryAddr is the local liaison client port that serves the authoritative registry, read only when this agent is the one the proxy selects.

func (*Collector) Collect

func (c *Collector) Collect(ctx context.Context) (*fodcv1.LifecycleData, error)

Collect returns lifecycle data, serving the cache when fresh. A transient InspectAll failure is propagated to the caller (the cache is left untouched so the next call retries) so that callers can distinguish a real failure from a healthy liaison that happens to have zero groups.

func (*Collector) FetchSchemaRegistry added in v0.11.0

func (c *Collector) FetchSchemaRegistry(ctx context.Context) ([]*fodcv1.SchemaRegistryGroup, error)

FetchSchemaRegistry reads the authoritative registry from the local liaison client endpoint and returns its per-object fingerprints, one entry per group, which the agent streams to the proxy. Fingerprint compute lives here in the FODC agent, never in the banyandb data path, and it runs only on the one agent the proxy selects, so the authoritative registry is read once per collection cycle. A fatal read failure is returned as an error (the proxy surfaces it rather than silently degrading to UNKNOWN); a group whose own read failed is returned as a group carrying its error and no objects.

Jump to

Keyboard shortcuts

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