Versions in this module Expand all Collapse all v0 v0.1.0 Feb 18, 2026 Changes in this version + const MaxErrorLength + const MaxEventsPerRequest + const MaxInputLength + type Actor string + const ActorAgent + const ActorHuman + const ActorUnknown + type CatalogData struct + Commands []CommandMapping + Tokens []TokenMapping + Version string + type Client struct + func NewClient(cfg ClientConfig) *Client + func (c *Client) Reset() + func (c *Client) RetryAfter() time.Time + func (c *Client) SampleRate() float64 + func (c *Client) ShouldSend() bool + func (c *Client) Submit(ctx context.Context, events []FrictionEvent, opts *SubmitOptions) (*SubmitResponse, error) + type ClientConfig struct + AuthFunc func() string + Endpoint string + HTTPClient *http.Client + Timeout time.Duration + Version string + type CommandMapping struct + Confidence float64 + Count int + Description string + Pattern string + Target string + type FailureKind string + const FailureInvalidArg + const FailureParseError + const FailureUnknownCommand + const FailureUnknownFlag + type FrictionEvent struct + Actor string + AgentType string + Command string + ErrorMsg string + Input string + Kind string + PathBucket string + Subcommand string + Suggestion string + Timestamp string + func NewFrictionEvent(kind string) FrictionEvent + func (f *FrictionEvent) Truncate() + type FrictionResponse struct + Accepted int + Catalog *CatalogData + type RingBuffer struct + func NewRingBuffer(capacity int) *RingBuffer + func (rb *RingBuffer) Add(event FrictionEvent) + func (rb *RingBuffer) Count() int + func (rb *RingBuffer) Drain() []FrictionEvent + type SubmitOptions struct + CatalogVersion string + type SubmitRequest struct + Events []FrictionEvent + Version string + type SubmitResponse struct + Catalog *CatalogData + RetryAfter time.Duration + SampleRate float64 + StatusCode int + type TokenMapping struct + Confidence float64 + Count int + Kind string + Pattern string + Target string