Versions in this module Expand all Collapse all v0 v0.9.1 Oct 15, 2026 Changes in this version + const DefaultQueueDepth + const Schema + const TypePoint + const TypeRunFailed + const TypeRunFinished + const TypeRunStarted + const TypeWarning + func IsLoopbackHost(host string) bool + func NewRunID() string + func SanitizeTarget(target string) string + func ValidRunID(id string) error + func ValidatePushURL(raw string, insecure bool) (*url.URL, error) + func Write(w io.Writer, events []Envelope) error + type Aborter interface + Abort func() + type Drainer interface + Drain func() + type Emitter interface + Failed func(reason string, partial any) + Finished func(result any, passed bool, exitCode int) + Point func(p Point) + Started func(at time.Time, rs RunStarted) + Warning func(msg string) + type Envelope struct + Data json.RawMessage + Labels map[string]string + OffsetS float64 + RunID string + Schema string + Seq int64 + Synthetic bool + TS time.Time + Type string + func (e Envelope) Terminal() bool + type FileSink struct + func NewFileSink(path string) (*FileSink, error) + func (s *FileSink) Close() error + func (s *FileSink) Name() string + func (s *FileSink) Write(line []byte) error + type Flusher interface + Deadline func() (t time.Time, ok bool) + Flush func() error + type Point struct + ErrorRate float64 + Failed int64 + OffsetS float64 + P50Ms float64 + P95Ms float64 + P99Ms float64 + RPS float64 + Requests int64 + Total int64 + TotalFailed int64 + type PushOptions struct + BackoffMax time.Duration + BackoffMin time.Duration + Client *http.Client + MaxBatch int + MaxDelay time.Duration + Timeout time.Duration + Token string + URL *url.URL + Version string + type PushSink struct + func NewPushSink(opt PushOptions) *PushSink + func (s *PushSink) Abort() + func (s *PushSink) Close() error + func (s *PushSink) Deadline() (time.Time, bool) + func (s *PushSink) Delivered() (delivered, lost int) + func (s *PushSink) Drain() + func (s *PushSink) Flush() error + func (s *PushSink) Name() string + func (s *PushSink) Warnings() []string + func (s *PushSink) Write(line []byte) error + type Recorder struct + func NewRecorder(opt RecorderOptions, sinks ...Sink) *Recorder + func (r *Recorder) Close(timeout time.Duration) []string + func (r *Recorder) Failed(reason string, partial any) + func (r *Recorder) Finished(result any, passed bool, exitCode int) + func (r *Recorder) HasStarted() bool + func (r *Recorder) Point(p Point) + func (r *Recorder) RunID() string + func (r *Recorder) Started(at time.Time, rs RunStarted) + func (r *Recorder) Warning(msg string) + func (r *Recorder) Warnings() []string + type RecorderOptions struct + Labels map[string]string + QueueDepth int + RunID string + type Recording struct + Events []Envelope + Path string + Raw [][]byte + func Read(r io.Reader) (*Recording, error) + func ReadFile(path string) (*Recording, error) + func (r *Recording) RunID() string + func (r *Recording) Terminal() (Envelope, bool) + type RunStarted struct + AbortOnBreach bool + Duration string + Executor string + Name string + Rate float64 + Stages []Stage + Target *Target + Thresholds []ThresholdSpec + VUs int + Version string + type Sink interface + Close func() error + Name func() string + Write func(line []byte) error + type Stage struct + Duration string + Target int + type Target struct + BaseURL string + Protocol string + type ThresholdSpec struct + Metric string + Name string + Op string + Operator string + Protocol string + Step string + Value string + type Warner interface + Warnings func() []string + type Warning struct + Message string