collector

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2025 License: AGPL-3.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewExecutionError

func NewExecutionError(err error, executionId string) error

Types

type AwaitingCompactionMsg

type AwaitingCompactionMsg struct{}

type CollectionFinishedMsg

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

type CollectionStatusUpdateMsg added in v0.2.0

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

type Collector

type Collector struct {
	// this buffered channel is used to asynchronously process events from the plugin
	// our Notify function will send events to this channel
	Events chan events.Event
	// contains filtered or unexported fields
}

func New

func New(pluginManager *plugin.PluginManager, partition *config.Partition, cancel context.CancelFunc) (*Collector, error)

New creates a new collector

func (*Collector) Close

func (c *Collector) Close()

Close closes the collector - closes the events channel - closes the parquet convertor - removes the JSONL path - removes the collection temp dir

func (*Collector) Collect

func (c *Collector) Collect(ctx context.Context, fromTime, toTime time.Time, overwrite bool) (err error)

Collect asynchronously starts the collection process - creates a new execution - tells the plugin manager to start collecting - validates the schema returned by the plugin - starts the collection UI - creates a parquet writer, which will process the JSONL files as they are written - starts listening to plugin events

func (*Collector) Compact

func (c *Collector) Compact(ctx context.Context) error

Compact compacts the parquet files so that for each date folder (the lowest level of the partition) there is only one parquet file

func (*Collector) Completed added in v0.2.0

func (c *Collector) Completed()

Completed marks the collection as complete and renders the summary - progress = true : sends completed event to tea app - progress = false : writes the summary to stdout

func (*Collector) Notify

func (c *Collector) Notify(_ context.Context, event events.Event) error

Notify implements observer.Observer send an event down the channel to be picked up by the handlePluginEvent goroutine

func (*Collector) StatusString

func (c *Collector) StatusString() string

func (*Collector) WaitForCompletion

func (c *Collector) WaitForCompletion(ctx context.Context) error

WaitForCompletion waits for our execution to have state ExecutionState_COMPLETE

type ConcurrentDataGenerator added in v0.7.0

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

ConcurrentDataGenerator handles concurrent data generation and marshaling

func NewConcurrentDataGenerator added in v0.7.0

func NewConcurrentDataGenerator(numWorkers int) *ConcurrentDataGenerator

NewConcurrentDataGenerator creates a new concurrent data generator

type ExecutionError

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

func (ExecutionError) Error

func (e ExecutionError) Error() string

func (*ExecutionError) Unwrap

func (e *ExecutionError) Unwrap() error

Unwrap implements error wrapping.

type ExecutionState

type ExecutionState int

enum of execution states

const (
	ExecutionState_PENDING ExecutionState = iota
	ExecutionState_STARTED ExecutionState = iota
	ExecutionState_COMPLETE
	ExecutionState_ERROR
)

Jump to

Keyboard shortcuts

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