ttl

package
v0.0.0-...-722fe32 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Job

type Job struct {
	Key        string
	Expiration time.Time
}

func NewJob

func NewJob(key string, expiration time.Time) *Job

type TTL

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

func NewTTL

func NewTTL(deleter func(key string) error) *TTL

func (*TTL) Add

func (ttl *TTL) Add(job *Job)

func (*TTL) Delete

func (ttl *TTL) Delete(key string)

func (*TTL) IsExpired

func (ttl *TTL) IsExpired(key string) bool

func (*TTL) Start

func (ttl *TTL) Start()

func (*TTL) Stop

func (ttl *TTL) Stop()

Jump to

Keyboard shortcuts

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