Documentation
¶
Overview ¶
Package eventlog persists session-scoped envelopes for resume and subscription replay. The default implementation is in-memory ring per session.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entry ¶
type Entry struct {
SessionID string
EventSeq uint64
JobID string
StoredAt time.Time
Envelope arcp.Envelope
}
Entry is one persisted envelope.
type Log ¶
type Log interface {
Append(e Entry) error
Since(sessionID string, fromSeq uint64) ([]Entry, error)
SinceJob(jobID string, fromSeq uint64) ([]Entry, error)
Trim(sessionID string, beforeSeq uint64) error
}
Log is the event-log interface.
type Memory ¶
type Memory struct {
// contains filtered or unexported fields
}
Memory is a per-session in-memory event log with a fixed retention window. It is not durable; for production deployments wire a persistent Log against your own store.
func NewMemory ¶
NewMemory returns a Memory log retaining at most maxPerSession entries per session (the oldest are dropped past the limit).
Click to show internal directories.
Click to hide internal directories.