runtime

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: May 1, 2026 License: MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteProjectionView added in v0.2.0

func WriteProjectionView(path string, view ProjectionView) error

Types

type Engine

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

func NewEngine

func NewEngine(cfg EngineConfig) (*Engine, error)

func (*Engine) Close

func (e *Engine) Close(ctx context.Context) error

func (*Engine) FlushDue

func (e *Engine) FlushDue(ctx context.Context) error

func (*Engine) Ingest

func (e *Engine) Ingest(ctx context.Context, spans []traces.Span, receivedAt time.Time) error

func (*Engine) IngestWithSource

func (e *Engine) IngestWithSource(ctx context.Context, spans []traces.Span, receivedAt time.Time, source snapshot.SourceSummary) error

func (*Engine) LatestReconciliationReport added in v0.2.0

func (e *Engine) LatestReconciliationReport() (reconciliation.Report, bool)

type EngineConfig

type EngineConfig struct {
	WindowSize               time.Duration
	MaxInMemorySpans         int
	LateSpanPolicy           string
	Sink                     SnapshotSink
	Metrics                  *Metrics
	Logger                   *slog.Logger
	Now                      func() time.Time
	SourceRef                string
	Sources                  []snapshot.SourceSummary
	Overlays                 []overlay.File
	ReconciliationConfig     reconciliation.Config
	ReconciliationReportPath string
	RawWindowPath            string
	StableCorePath           string
}

type FileSink

type FileSink struct {
	Directory  string
	LatestPath string
}

func (FileSink) Write

func (s FileSink) Write(_ context.Context, env snapshot.Envelope) error

type Metrics

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

func NewMetrics

func NewMetrics() *Metrics

func (*Metrics) AddDropped

func (m *Metrics) AddDropped(count int)

func (*Metrics) AddIngested

func (m *Metrics) AddIngested(count int)

func (*Metrics) Handler

func (m *Metrics) Handler() http.Handler

func (*Metrics) RecordReconciliation added in v0.2.0

func (m *Metrics) RecordReconciliation(report reconciliation.Report)

func (*Metrics) RecordSnapshot

func (m *Metrics) RecordSnapshot(env snapshot.Envelope, buildDuration time.Duration, now time.Time)

func (*Metrics) SetWindowLag

func (m *Metrics) SetWindowLag(now, end time.Time)

type ProjectionView added in v0.2.0

type ProjectionView struct {
	Name              string             `json:"name"`
	Observation       int64              `json:"observation"`
	StructuralVersion int64              `json:"structural_version"`
	Available         bool               `json:"available"`
	TopologyVersion   string             `json:"topology_version,omitempty"`
	Snapshot          *snapshot.Envelope `json:"snapshot,omitempty"`
}

type Service

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

func NewService

func NewService(cfg config.ServeConfig, overlays []overlay.File, logger *slog.Logger) (*Service, error)

func (*Service) Addr

func (s *Service) Addr() string

func (*Service) GRPCAddr

func (s *Service) GRPCAddr() string

func (*Service) Run

func (s *Service) Run(ctx context.Context) error

type SnapshotSink

type SnapshotSink interface {
	Write(context.Context, snapshot.Envelope) error
}

Jump to

Keyboard shortcuts

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