Documentation
¶
Overview ¶
Package store is the lab's in-memory record store. Audit webhook delivery is asynchronous and batched, so a late event from one scenario can land after the next has started; clearing between scenarios is therefore not enough. The store keeps every record attributed to its scenario and serves reads filtered by scenario, so the test driver isolates scenarios instead of trusting a clean slate (see docs/spec/mutation-capture-lab-design.md, "Isolated Test Setup").
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 is a concurrency-safe, insertion-ordered record store.
func (*Store) Add ¶
func (s *Store) Add(r mutationlab.Record) mutationlab.Record
Add stores a record, assigning a stable insertion ID when the record has none, and returns the stored copy. Records are kept in observation (insertion) order, because for the corpus the ordering and count of events are part of the behavior under test.