loader

package
v0.0.0-...-406c194 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadGeoIPFromDAT

func LoadGeoIPFromDAT(file, tag string) (*v2data.GeoIP, error)

func LoadGeoIPFromDATByTags

func LoadGeoIPFromDATByTags(file string, tags []string) ([]*v2data.GeoIP, error)

func LoadGeoIPListFromDAT

func LoadGeoIPListFromDAT(file string) (*v2data.GeoIPList, error)

func LoadGeoSiteFromDAT

func LoadGeoSiteFromDAT(file, countryCode string) (*v2data.GeoSite, error)

func LoadGeoSiteFromDATByTags

func LoadGeoSiteFromDATByTags(file string, tags []string) ([]*v2data.GeoSite, error)

func LoadGeoSiteList

func LoadGeoSiteList(file string) (*v2data.GeoSiteList, error)

func RemoveCache

func RemoveCache(key string)

Types

type LoadOnceCache

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

func NewCache

func NewCache() *LoadOnceCache

func (*LoadOnceCache) ClearAll

func (c *LoadOnceCache) ClearAll()

func (*LoadOnceCache) Load

func (c *LoadOnceCache) Load(key string) (interface{}, bool)

func (*LoadOnceCache) LoadFromCacheOrRawDisk

func (c *LoadOnceCache) LoadFromCacheOrRawDisk(file string) (interface{}, []byte, error)

func (*LoadOnceCache) Put

func (c *LoadOnceCache) Put(key string, data interface{}, ttl time.Duration)

func (*LoadOnceCache) Remove

func (c *LoadOnceCache) Remove(key string)

Jump to

Keyboard shortcuts

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