package
0.0.0-20241107035240-db96926ac414
Repository: https://github.com/aintelligencegame/clicktail.git
Documentation: pkg.go.dev

# README

libclick Build Status

Go library for sending events to ClickHouse. This is a fork of libhoney-go libarary.

Installation:

go get -v github.com/Altinity/libclick-go

Documentation

See original repository.

# Packages

No description provided by the author

# Functions

Add adds its data to the global scope.
AddDynamicField takes a field name and a function that will generate values for that metric.
AddField adds a Field to the global scope.
Close waits for all in-flight messages to be sent.
Init is called on app initialization and passed a Config struct, which configures default behavior.
NewBuilder creates a new event builder.
NewEvent creates a new event prepopulated with any Fields present in the global scope.
Responses returns the channel from which the caller can read the responses to sent events.
SendNow is a shortcut to create an event, add data, and send the event.
No description provided by the author

# Constants

DefaultBatchTimeout how frequently to send unfilled batches.
DefaultMaxBatchSize how many events to collect in a batch.
DefaultMaxConcurrentBatches how many batches to maintain in parallel.
DefaultPendingWorkCapacity how many events to queue up for busy batches.

# Variables

UserAgentAddition is a variable set at compile time via -ldflags to allow you to augment the "User-Agent" header that libclick sends along with each event.

# Structs

Builder is used to create templates for new events, specifying default fields and override settings.
Config specifies settings for initializing the library.
Event is used to hold data that can be sent to Honeycomb.
MockOutput implements the Output interface by retaining a slice of added events, for use in unit tests.
Response is a record of an event sent.
WriterOutput implements the Output interface by marshalling events to JSON and writing to STDOUT, or to the writer W if one is specified.

# Interfaces

Output is responsible for handling events after Send() is called.