memory

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

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

func New

func New(c clock.Clock) *Repository

func (*Repository) Add

func (mr *Repository) Add(
	ctx context.Context,
	svr servers.Server,
	onConflict func(*servers.Server) bool,
) (servers.Server, error)

func (*Repository) Count

func (mr *Repository) Count(context.Context) (int, error)

func (*Repository) CountByStatus

func (mr *Repository) CountByStatus(_ context.Context) (map[ds.DiscoveryStatus]int, error)

func (*Repository) Filter

func (mr *Repository) Filter(
	_ context.Context,
	fs servers.FilterSet,
) ([]servers.Server, error)

func (*Repository) Get

func (mr *Repository) Get(_ context.Context, addr addr.Addr) (servers.Server, error)

func (*Repository) Remove

func (mr *Repository) Remove(
	_ context.Context,
	svr servers.Server,
	onConflict func(*servers.Server) bool,
) error

func (*Repository) Update

func (mr *Repository) Update(
	ctx context.Context,
	svr servers.Server,
	onConflict func(*servers.Server) bool,
) (servers.Server, error)

Jump to

Keyboard shortcuts

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