check

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2025 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checker

type Checker struct {
	*sync.Mutex `json:"-" yaml:"-"`
	Times       []time.Time
	Values      map[time.Time][]string

	Name string
	// contains filtered or unexported fields
}

func New

func New() *Checker

func (*Checker) Clean

func (c *Checker) Clean()

func (*Checker) GetExpired

func (c *Checker) GetExpired() []string

func (*Checker) Now

func (c *Checker) Now() time.Time

For external use only

func (*Checker) Push

func (c *Checker) Push(t time.Time, v string) error

func (*Checker) Run

func (c *Checker) Run(ctx context.Context, checkEvery time.Duration, expired chan []string)

func (*Checker) SetNow

func (c *Checker) SetNow(now func() time.Time)

func (*Checker) WithName

func (c *Checker) WithName(name string) *Checker

func (*Checker) WithNow

func (c *Checker) WithNow(now func() time.Time) *Checker

Jump to

Keyboard shortcuts

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