store

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2026 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNotFound

func IsNotFound(err error) bool

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

func Open

func Open(path string) (*Store, error)

func (*Store) Close

func (s *Store) Close() error

func (*Store) DeleteNodeIfStale

func (s *Store) DeleteNodeIfStale(ctx context.Context, ip string) error

func (*Store) LastRefresh

func (s *Store) LastRefresh(ctx context.Context) time.Time

func (*Store) MarkFailure

func (s *Store) MarkFailure(ctx context.Context, ip, reason string) error

func (*Store) Metadata

func (s *Store) Metadata(ctx context.Context, key string) (string, error)

func (*Store) Node

func (s *Store) Node(ctx context.Context, ip string) (model.Node, error)

func (*Store) Nodes

func (s *Store) Nodes(ctx context.Context, mode string, limit, offset int) ([]model.Node, error)

func (*Store) ReplaceNodes

func (s *Store) ReplaceNodes(ctx context.Context, nodes []model.Node, refreshedAt time.Time, preserveIP string) error

func (*Store) SaveMeasurement

func (s *Store) SaveMeasurement(ctx context.Context, ip string, bitsPerSecond int64) error

func (*Store) SaveMeasurementFailure

func (s *Store) SaveMeasurementFailure(ctx context.Context, ip string) error

func (*Store) SetMetadata

func (s *Store) SetMetadata(ctx context.Context, key, value string) error

Jump to

Keyboard shortcuts

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