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: 5 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 is an in-memory implementation of errs.ErrorStore using a circular buffer for events and a map for groups.

func NewStore

func NewStore(eventCap int) *Store

NewStore creates a new in-memory error store. eventCap controls the maximum number of error events kept (circular buffer).

func (*Store) GetEvents

func (s *Store) GetEvents(groupID string, limit int) ([]errs.ErrorEvent, error)

GetEvents returns events for a group, most recent first.

func (*Store) GetGroup

func (s *Store) GetGroup(id string) (*errs.ErrorGroup, error)

GetGroup returns a single error group by fingerprint ID.

func (*Store) GetGroups

func (s *Store) GetGroups(status string, limit int) ([]errs.ErrorGroup, error)

GetGroups returns error groups optionally filtered by status.

func (*Store) IngestError

func (s *Store) IngestError(event errs.ErrorEvent) error

IngestError adds an error event and creates/updates the corresponding group.

func (*Store) UpdateGroupStatus

func (s *Store) UpdateGroupStatus(id string, status string) error

UpdateGroupStatus updates the status of an error group.

Jump to

Keyboard shortcuts

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