memory

package
v1.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 4, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store implements traffic.RecordingStore using a mutex-protected map.

func NewStore

func NewStore() *Store

NewStore creates a new in-memory traffic store.

func (*Store) DeleteRecording

func (s *Store) DeleteRecording(_ context.Context, id string) error

DeleteRecording removes a recording by ID.

func (*Store) GetRecording

func (s *Store) GetRecording(_ context.Context, id string) (*traffic.Recording, error)

GetRecording returns a recording by ID.

func (*Store) GetRun

func (s *Store) GetRun(_ context.Context, id string) (*traffic.ReplayRun, error)

GetRun returns a replay run by ID.

func (*Store) ListRecordings

func (s *Store) ListRecordings(_ context.Context) ([]traffic.Recording, error)

ListRecordings returns all recordings sorted newest first.

func (*Store) ListRuns

func (s *Store) ListRuns(_ context.Context) ([]traffic.ReplayRun, error)

ListRuns returns all replay runs sorted newest first.

func (*Store) SaveRecording

func (s *Store) SaveRecording(_ context.Context, rec *traffic.Recording) error

SaveRecording persists a recording, assigning an ID if empty.

func (*Store) SaveRun

func (s *Store) SaveRun(_ context.Context, run *traffic.ReplayRun) error

SaveRun persists a replay run, assigning an ID if empty.

func (*Store) UpdateRun

func (s *Store) UpdateRun(_ context.Context, run *traffic.ReplayRun) error

UpdateRun overwrites an existing run.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL