Documentation
¶
Index ¶
- Variables
- type HookRunRecord
- type Journal
- func (j *Journal) Close(ctx context.Context) error
- func (j *Journal) CurrentBufferDepth() int
- func (j *Journal) DBPath() string
- func (j *Journal) DroppedEventCounts() (uint64, uint64)
- func (j *Journal) DropsOnSubmit() uint64
- func (j *Journal) EventsWritten() uint64
- func (j *Journal) Path() string
- func (j *Journal) RecordHookRun(ctx context.Context, record HookRunRecord) error
- func (j *Journal) SetBus(bus *events.Bus[events.Event])
- func (j *Journal) Submit(ctx context.Context, ev events.Event) error
- func (j *Journal) SubmitWithSeq(ctx context.Context, ev events.Event) (uint64, error)
- type Owner
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrClosed reports submits to a closed journal. ErrClosed = errors.New("journal closed") // ErrSubmitTimeout reports a dropped submit after the backpressure window expires. ErrSubmitTimeout = errors.New("journal submit timeout") )
Functions ¶
This section is empty.
Types ¶
type HookRunRecord ¶
type HookRunRecord struct {
ID string
HookName string
Source string
Outcome string
Duration time.Duration
PayloadJSON string
RecordedAt time.Time
}
HookRunRecord carries one hook audit row into the run store.
type Journal ¶
type Journal struct {
// contains filtered or unexported fields
}
Journal persists per-run events before forwarding them to live subscribers.
func (*Journal) CurrentBufferDepth ¶
CurrentBufferDepth reports the current enqueue depth.
func (*Journal) DroppedEventCounts ¶
DroppedEventCounts reports dropped event submissions grouped by whether the dropped event was terminal.
func (*Journal) DropsOnSubmit ¶
DropsOnSubmit reports the number of submits dropped after backpressure timeout.
func (*Journal) EventsWritten ¶
EventsWritten reports the number of events durably flushed to disk.
func (*Journal) RecordHookRun ¶
func (j *Journal) RecordHookRun(ctx context.Context, record HookRunRecord) error
RecordHookRun persists one hook audit record through the serialized journal loop.
type Owner ¶
type Owner struct {
// contains filtered or unexported fields
}
Owner retains explicit close ownership for a journal that is passed through preparation objects.
Click to show internal directories.
Click to hide internal directories.