capture

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Source     Source
	Normalizer normalize.Normalizer
	Store      storage.Store
	Manifest   core.Manifest
	Capture    core.CaptureSettings
	RunID      string
	RunIDGenerator
}

Options define the dependencies and metadata required to execute a capture pipeline.

func (Options) Validate

func (o Options) Validate() error

Validate ensures the options contain the minimum required pieces to execute a capture.

type Pipeline

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

Pipeline coordinates a capture session across a source, normalizer, and storage backend.

func NewPipeline

func NewPipeline(opts Options) (*Pipeline, error)

NewPipeline constructs a pipeline with validated options, wiring default run ID generators when absent.

func (*Pipeline) Run

func (p *Pipeline) Run(ctx context.Context) (*core.Run, error)

Run executes the capture until the source channel closes or the context is cancelled, returning the finalized run.

type RunIDGenerator

type RunIDGenerator func() string

RunIDGenerator allows callers to supply deterministic run identifiers (useful in tests).

type Source

type Source interface {
	Frames() <-chan []byte
	Meta() core.SourceMeta
}

Source represents an ingest source capable of streaming byte frames along with metadata.

Jump to

Keyboard shortcuts

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