history

package
v0.5.8 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 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 File

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

func NewFile

func NewFile(l log.Logger, opts ...FileOption) (*File, error)

func (*File) Load

func (h *File) Load(ctx context.Context) ([]string, error)

func (*File) Persist

func (h *File) Persist(ctx context.Context, record string)

type FileOption

type FileOption func(*File) error

func FileWithFilename

func FileWithFilename(v string) FileOption

func FileWithLimit

func FileWithLimit(v int) FileOption

func FileWithLockFilename

func FileWithLockFilename(v string) FileOption

type History

type History interface {
	Load(ctx context.Context) ([]string, error)
	Persist(ctx context.Context, record string)
}

type Noop

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

func NewNoop

func NewNoop(l log.Logger) *Noop

func (*Noop) Load

func (h *Noop) Load(ctx context.Context) ([]string, error)

func (*Noop) Persist

func (h *Noop) Persist(ctx context.Context, record string)

Jump to

Keyboard shortcuts

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