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: 3 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 uptime store with a circular buffer per check.

func NewStore

func NewStore(bufferSize int) *Store

NewStore creates an in-memory uptime store.

func (*Store) AddResult

func (s *Store) AddResult(result uptime.CheckResult) error

func (*Store) ConsecutiveFailures

func (s *Store) ConsecutiveFailures(checkID string) int

func (*Store) CreateCheck

func (s *Store) CreateCheck(check uptime.Check) error

func (*Store) DeleteCheck

func (s *Store) DeleteCheck(id string) error

func (*Store) GetCheck

func (s *Store) GetCheck(id string) (*uptime.Check, error)

func (*Store) LastFailure

func (s *Store) LastFailure(checkID string) (*uptime.CheckResult, error)

func (*Store) LastResult

func (s *Store) LastResult(checkID string) (*uptime.CheckResult, error)

func (*Store) ListChecks

func (s *Store) ListChecks() ([]uptime.Check, error)

func (*Store) Results

func (s *Store) Results(checkID string) ([]uptime.CheckResult, error)

func (*Store) UpdateCheck

func (s *Store) UpdateCheck(check uptime.Check) error

Jump to

Keyboard shortcuts

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