persistentcache

package
v0.0.0-...-5c3e238 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PersistentCache

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

PersistentCache is an age bounded on-disk cache

func New

func New(filename string, maxAge time.Duration) (*PersistentCache, error)

func (*PersistentCache) Add

func (cache *PersistentCache) Add(name string, ip []byte)

func (*PersistentCache) Close

func (cache *PersistentCache) Close() error

Close closes the persistent cache

func (*PersistentCache) IPByName

func (cache *PersistentCache) IPByName(name string) (ip []byte, found bool)

func (*PersistentCache) MarkFresh

func (cache *PersistentCache) MarkFresh(name string, ip []byte)

func (*PersistentCache) NameByIP

func (cache *PersistentCache) NameByIP(ip []byte) (name string, found bool)

func (*PersistentCache) NextSequence

func (cache *PersistentCache) NextSequence() (next uint32)

Jump to

Keyboard shortcuts

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