ipcache

package
v0.0.0-...-892f5d3 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2024 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewCache

func NewCache(duration time.Duration, v6 bool, dsn string) *Cache

func (*Cache) DeletePersistent

func (cache *Cache) DeletePersistent(key string)

func (*Cache) Get

func (cache *Cache) Get(key string) (data []net.IP, found bool)

func (*Cache) GetPersistent

func (cache *Cache) GetPersistent(key string) (data []net.IP, found bool)

func (*Cache) Prefetch

func (cache *Cache) Prefetch()

func (*Cache) Set

func (cache *Cache) Set(key string, data []net.IP, ttl uint32)

func (*Cache) SetPersistent

func (cache *Cache) SetPersistent(key string, data []net.IP)

type Item

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

Jump to

Keyboard shortcuts

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