runtime

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2026 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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

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
}

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) 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 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