Versions in this module Expand all Collapse all v0 v0.3.0 Apr 19, 2026 Changes in this version + func Capture(ctx context.Context, stream net.Conn, localAddr string, store Store, ...) error + func NewID() string + type BodyReason string + const BodyFull + const BodyStreamed + const BodyTooLarge + const BodyUpgrade + type Filter struct + Cursor string + Limit int + Method string + PathSub string + StatusClass int + type MemoryStore struct + func NewMemoryStore(capacity int) *MemoryStore + func (m *MemoryStore) Add(_ context.Context, r *Record) error + func (m *MemoryStore) Close() error + func (m *MemoryStore) Get(_ context.Context, id string) (*Record, error) + func (m *MemoryStore) List(_ context.Context, f Filter) ([]*Record, error) + func (m *MemoryStore) Subscribe() (<-chan *Record, func()) + type Options struct + MaxReqBody int + MaxRespBody int + Subdomain string + func DefaultOptions() Options + type Record struct + DurationMs int64 + Err string + Host string + ID string + Method string + OfID string + Path string + Proto string + ReceivedAt time.Time + RemoteAddr string + Replay bool + ReqBody []byte + ReqHeaders http.Header + ReqReason BodyReason + ReqSize int64 + RespBody []byte + RespHeaders http.Header + RespReason BodyReason + RespSize int64 + Status int + Subdomain string + type Replayer struct + LocalAddr string + Options Options + Store Store + func (rp *Replayer) Replay(ctx context.Context, id string) (*Record, error) + type SQLiteStore struct + func NewSQLiteStore(path string) (*SQLiteStore, error) + func (s *SQLiteStore) Add(ctx context.Context, r *Record) error + func (s *SQLiteStore) Close() error + func (s *SQLiteStore) Get(ctx context.Context, id string) (*Record, error) + func (s *SQLiteStore) List(ctx context.Context, f Filter) ([]*Record, error) + func (s *SQLiteStore) Subscribe() (<-chan *Record, func()) + type Store interface + Add func(ctx context.Context, r *Record) error + Close func() error + Get func(ctx context.Context, id string) (*Record, error) + List func(ctx context.Context, f Filter) ([]*Record, error) + Subscribe func() (<-chan *Record, func())