time

package
v0.0.0-...-12e214a Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DropPolicy

type DropPolicy int

DropPolicy

const (
	DontDrop DropPolicy
	DropRandom
	DropOldest
	DropNewest
)

type TMap

type TMap[T comparable] interface {
	Size() int
	Add(T) time.Time
	Capacity(...int) int
	Get(T) (time.Time, bool)
	Delete(T) (time.Time, bool)
	Newest() (T, time.Time, bool)
	Oldest() (T, time.Time, bool)
	Each(func(T, time.Time) error) error
}

TMap

func NewTMap

func NewTMap[T comparable](capacity int, policy DropPolicy) TMap[T]

NewTMap

Jump to

Keyboard shortcuts

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