ingest

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoTargets = errors.New("no ingest targets registered")

ErrNoTargets is reserved for future use when the daemon has no registered services.

Functions

This section is empty.

Types

type AWSLogsClient

type AWSLogsClient interface {
	FilterEvents(ctx context.Context, logGroup string, startMs, endMs int64, limit int32, nextToken *string) (*cwaws.FilterEventsPage, error)
}

AWSLogsClient is the subset of internal/aws.LogsClient that ingest uses. Defined here so tests can inject a fake without spinning up a real AWS SDK.

type LogsClientFactory

type LogsClientFactory func(ctx context.Context, region string) (AWSLogsClient, error)

LogsClientFactory builds an AWSLogsClient for a given region. The runner caches one per region.

type Runner

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

Runner owns the per-service goroutines. Add/Remove are safe to call after Start to support registry hot-reload.

func NewRunner

func NewRunner(db *logsdb.DB, factory LogsClientFactory, logger *slog.Logger) *Runner

NewRunner wires the runner.

func (*Runner) Stop

func (r *Runner) Stop()

Stop cancels every running goroutine.

func (*Runner) Sync

func (r *Runner) Sync(ctx context.Context, targets []Target)

Sync brings the running set in line with targets, starting/stopping goroutines as needed. Safe to call repeatedly on registry reload.

type Target

type Target struct {
	ID       string
	Region   string
	Runtime  config.Runtime
	LogGroup string
}

Target identifies a service for the ingest loop.

Directories

Path Synopsis
Package parsers contains per-runtime CloudWatch log-line parsers used by the citadel-logs ingest loop.
Package parsers contains per-runtime CloudWatch log-line parsers used by the citadel-logs ingest loop.

Jump to

Keyboard shortcuts

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