Versions in this module Expand all Collapse all v1 v1.0.1 Oct 11, 2026 v1.0.0 Oct 10, 2026 Changes in this version + const DefaultCollectBaseURL + const DefaultTimeout + const DefaultWeight + const EnvDebugKey + const EnvRateKey + const MaxMessageLength + func BuildReferer(appID, viewPath string) string + func GenerateSessionID() string + func ParseWeight(rate string) int + func ResolveDebug(environment map[string]string) bool + func ResolveRate(explicit string, environment map[string]string) string + func Sanitize(msg string) string + type Checkpoint string + const CWV + const Click + const Enter + const Error + const FormSubmit + const Navigate + const PagesViewed + const Reload + const Top + const ViewBlock + const ViewMedia + type Client struct + func Configure(appID string, opts Options) *Client + func (c *Client) Flush(timeout time.Duration) + func (c *Client) ReportError(source string, err error) + func (c *Client) Sample(checkpoint Checkpoint, source, target string) + type Event struct + Checkpoint Checkpoint + ID string + Referer string + Source string + T int + Target string + Weight int + type HTTPTransport struct + Client *http.Client + Debug func(format string, args ...any) + Timeout time.Duration + func NewHTTPTransport(debug bool) *HTTPTransport + func (t *HTTPTransport) Send(event Event, collectBaseURL string, wg *sync.WaitGroup) + type Options struct + CollectBaseURL string + Debug *bool + Environment map[string]string + RandomSource RandomSource + Rate string + Transport Transport + type RandomSource interface + Float64 func() float64 + var DefaultRandomSource RandomSource = systemRandomSource{} + type SamplingConfig struct + Weight int + func NewSamplingConfig(rate string) SamplingConfig + type Session struct + ID string + Selected bool + Weight int + func NewSession(id string, config SamplingConfig, random RandomSource) Session + type Transport interface + Send func(event Event, collectBaseURL string, wg *sync.WaitGroup)