ttl

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2019 License: MIT Imports: 8 Imported by: ? modules, 0 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

View Source
var (
	// PrunePointerKey is the key of the key-value pair which we can use to
	// query the current prune pointer. This will always stored
	PrunePointerKey = "prunePointer"
)

Functions

func New

func New(ctx context.Context, database db.DB, name string, pruneInterval time.Duration) db.Table

New returns a new ttl wrapper over the given database. The underlying database cannot have any database has a prefix of `ttl_`.

Types

type Pointer added in v1.0.3

type Pointer int64

Pointer stores where the data is up to.

func (Pointer) MarshalBinary added in v1.0.3

func (p Pointer) MarshalBinary() ([]byte, error)

MarshalBinary implements the `BinaryMarshaler` interface.

func (*Pointer) UnmarshalBinary added in v1.0.3

func (p *Pointer) UnmarshalBinary(data []byte) error

UnmarshalBinary implements the `BinaryUnmarshaler` interface.

Jump to

Keyboard shortcuts

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