Documentation
¶
Index ¶
- func NewExecutionError(err error, executionId string) error
- type AwaitingCompactionMsg
- type CollectionFinishedMsg
- type CollectionStatusUpdateMsg
- type Collector
- func (c *Collector) Close()
- func (c *Collector) Collect(ctx context.Context, fromTime, toTime time.Time, overwrite bool) (err error)
- func (c *Collector) Compact(ctx context.Context) error
- func (c *Collector) Completed()
- func (c *Collector) Notify(_ context.Context, event events.Event) error
- func (c *Collector) StatusString() string
- func (c *Collector) WaitForCompletion(ctx context.Context) error
- type ConcurrentDataGenerator
- type ExecutionError
- type ExecutionState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewExecutionError ¶
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 ¶
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 ¶
Notify implements observer.Observer send an event down the channel to be picked up by the handlePluginEvent goroutine
func (*Collector) StatusString ¶
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 )