Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataCollectProcessor ¶
type DataCollectProcessor struct {
// contains filtered or unexported fields
}
func NewDataCollectProcessor ¶
func NewDataCollectProcessor(opts ...DatacollectOptionBuilder) *DataCollectProcessor
NewDataCollectProcessor creates a new DataCollectProcessor with the given options.
func (*DataCollectProcessor) Shutdown ¶ added in v0.0.7
func (d *DataCollectProcessor) Shutdown(ctx context.Context) error
func (*DataCollectProcessor) TrackHits ¶
func (d *DataCollectProcessor) TrackHits(hits connectors.TrackingHits) error
TrackHits adds the given hits to the processor for tracking. If the number of hits in the processor exceeds the batch size, a batch of hits is sent.
type DatacollectOptionBuilder ¶
type DatacollectOptionBuilder func(*DataCollectProcessor)
func WithBatchOptions ¶
func WithBatchOptions(batchSize int, batchingWindow time.Duration) DatacollectOptionBuilder
WithBatchOptions is an option function that sets the batch size and window for the DataCollectProcessor.
func WithHTTPClient ¶
func WithHTTPClient(client *http.Client) DatacollectOptionBuilder
WithHTTPClient is an option function that sets the HTTP client for the DataCollectProcessor.
func WithLogger ¶ added in v0.3.1
func WithLogger(lvl string, fmt logger.LogFormat) DatacollectOptionBuilder
WithLogger is an option function that sets the logger for the DataCollectProcessor.
func WithTrackingURL ¶
func WithTrackingURL(url string) DatacollectOptionBuilder
WithTrackingURL is an option function that sets the tracking URL for the DataCollectProcessor.
type EmptyHitProcessor ¶
type EmptyHitProcessor struct { }
func (*EmptyHitProcessor) TrackHits ¶
func (d *EmptyHitProcessor) TrackHits(hits connectors.TrackingHits) error
type MockHitProcessor ¶
type MockHitProcessor struct {
TrackedHits connectors.TrackingHits
}
func (*MockHitProcessor) Shutdown ¶ added in v0.0.7
func (d *MockHitProcessor) Shutdown(context.Context) error
func (*MockHitProcessor) TrackHits ¶
func (d *MockHitProcessor) TrackHits(hits connectors.TrackingHits) error
Click to show internal directories.
Click to hide internal directories.