stale

package
v0.2.10 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2026 License: Apache-2.0 Imports: 2 Imported by: 2 modules, 3 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsStaleAny

func IsStaleAny(os ...any) bool

IsStaleAny reports whether any of the os is marked as stale.

func MarkStale

func MarkStale(os ...any)

MarkStale will mark any of the oses as stale, if possible.

Types

type AtomicStaler

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

func (*AtomicStaler) IsStale

func (s *AtomicStaler) IsStale() bool

func (*AtomicStaler) MarkStale

func (s *AtomicStaler) MarkStale()

type Info

type Info interface {
	IsStale() bool
}

Info tells if a resource is marked as stale.

type Marker

type Marker interface {
	MarkStale()
}

Marker marks a Resource as stale.

type Staler

type Staler interface {
	Marker
	Info
}

Staler controls stale state of a Resource. A stale resource should be discarded.

type Value

type Value[V any] struct {
	// The value.
	Value V

	// IsStaleFunc reports whether the value is stale.
	IsStaleFunc func() bool
}

func (*Value[V]) IsStale

func (s *Value[V]) IsStale() bool

Jump to

Keyboard shortcuts

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