Documentation
¶
Overview ¶
Package capture writes bounded run recordings independently of database work.
Index ¶
- Constants
- type Options
- type Writer
- func (w *Writer) Add(name string, value any)
- func (w *Writer) Close() *report.Capture
- func (w *Writer) Dropped(name string)
- func (w *Writer) Elapsed(now time.Time) float64
- func (w *Writer) Enabled(name string) bool
- func (w *Writer) Enqueue(name string, data []byte)
- func (w *Writer) Event(kind, step, state string, workers int, duration, drain time.Duration)
- func (w *Writer) ID() string
- func (w *Writer) Logger(original *zap.Logger) *zap.Logger
- func (w *Writer) Missed(count uint64)
- func (w *Writer) ReportID() string
Constants ¶
View Source
const ( DefaultMaxBytes = 64 << 20 MaxRecordBytes = 256 << 10 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
Directory string
Logs bool
Metrics bool
Interval time.Duration
MaxBytes int64
ReportID string
RunID string
}
Options selects independently optional streams and per-stream byte budgets.
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer owns one fresh UUID directory. Producers never wait for disk writes.
func (*Writer) Enqueue ¶
Enqueue copies bounded data and drops immediately when capture cannot keep up.
Click to show internal directories.
Click to hide internal directories.