tasks

package
v5.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCleanFilterTask

func NewCleanFilterTask(
	filter storage.Filter,
	logger logging.LoggerInterface,
	period int,
) *asynctask.AsyncTask

NewRecordTelemetryTask creates a new telemtry recording task

func NewFetchSegmentsTask

func NewFetchSegmentsTask(
	fetcher segment.Updater,
	period int,
	workerCount int,
	queueSize int,
	logger logging.LoggerInterface,
) *asynctask.AsyncTask

NewFetchSegmentsTask creates a new segment fetching and storing task

func NewFetchSplitsTask

func NewFetchSplitsTask(
	fetcher split.Updater,
	period int,
	logger logging.LoggerInterface,
) *asynctask.AsyncTask

NewFetchSplitsTask creates a new splits fetching and storing task

func NewRecordImpressionsCountTask

func NewRecordImpressionsCountTask(
	recorder impressionscount.ImpressionsCountRecorder,
	logger logging.LoggerInterface,
	period int,
) *asynctask.AsyncTask

NewRecordImpressionsCountTask creates a new impressionsCount recording task

func NewRecordTelemetryTask

func NewRecordTelemetryTask(
	recorder telemetry.TelemetrySynchronizer,
	period int,
	logger logging.LoggerInterface,
) *asynctask.AsyncTask

NewRecordTelemetryTask creates a new telemtry recording task

func NewRecordUniqueKeysTask

func NewRecordUniqueKeysTask(
	recorder telemetry.TelemetrySynchronizer,
	uniqueTracker strategy.UniqueKeysTracker,
	period int,
	logger logging.LoggerInterface,
) *asynctask.AsyncTask

NewRecordUniqueKeysTask constructor

Types

type MultipleTask

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

MultipleTask struct

func (MultipleTask) IsRunning

func (m MultipleTask) IsRunning() bool

IsRunning method

func (MultipleTask) Start

func (m MultipleTask) Start()

Start method

func (MultipleTask) Stop

func (m MultipleTask) Stop(blocking bool) error

Stop method

type SegmentWorker

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

SegmentWorker struct contains resources and functions for fetching segments and storing them

func NewSegmentWorker

func NewSegmentWorker(name string, failureTime int64, logger logging.LoggerInterface, toExecute func(name string, till *int64) error) *SegmentWorker

NewSegmentWorker some

func (*SegmentWorker) Cleanup

func (w *SegmentWorker) Cleanup() error

Cleanup callback does nothing

func (*SegmentWorker) DoWork

func (w *SegmentWorker) DoWork(msg interface{}) error

DoWork performs the actual work and returns an error if something goes wrong

func (*SegmentWorker) FailureTime

func (w *SegmentWorker) FailureTime() int64

FailureTime Returns how much time should be waited after an error, before the worker resumes execution

func (*SegmentWorker) Name

func (w *SegmentWorker) Name() string

Name Returns the name of the worker

func (*SegmentWorker) OnError

func (w *SegmentWorker) OnError(e error)

OnError callback does nothing

type Task

type Task interface {
	Start()
	Stop(blocking bool) error
	IsRunning() bool
}

Task interface

func NewRecordEventsTask

func NewRecordEventsTask(
	synchronizer event.EventRecorder,
	bulkSize int64,
	period int,
	logger logging.LoggerInterface,
) Task

NewRecordEventsTask creates a new events recording task

func NewRecordEventsTasks

func NewRecordEventsTasks(
	recorder event.EventRecorder,
	bulkSize int64,
	period int,
	logger logging.LoggerInterface,
	totalTasks int) Task

NewRecordEventsTasks creates a new splits fetching and storing task

func NewRecordImpressionsTask

func NewRecordImpressionsTask(
	recorder impression.ImpressionRecorder,
	period int,
	logger logging.LoggerInterface,
	bulkSize int64,
) Task

NewRecordImpressionsTask creates a new splits fetching and storing task

func NewRecordImpressionsTasks

func NewRecordImpressionsTasks(
	recorder impression.ImpressionRecorder,
	period int,
	logger logging.LoggerInterface,
	bulkSize int64,
	totalTasks int) Task

NewRecordImpressionsTasks creates a new splits fetching and storing task

Jump to

Keyboard shortcuts

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