Documentation ¶
Index ¶
- func LoadGeoIPFromDAT(file, tag string) (*v2data.GeoIP, error)
- func LoadGeoIPFromDATByTags(file string, tags []string) ([]*v2data.GeoIP, error)
- func LoadGeoIPListFromDAT(file string) (*v2data.GeoIPList, error)
- func LoadGeoSiteFromDAT(file, countryCode string) (*v2data.GeoSite, error)
- func LoadGeoSiteFromDATByTags(file string, tags []string) ([]*v2data.GeoSite, error)
- func LoadGeoSiteList(file string) (*v2data.GeoSiteList, error)
- func RemoveCache(key string)
- type LoadOnceCache
- func (c *LoadOnceCache) ClearAll()
- func (c *LoadOnceCache) Load(key string) (interface{}, bool)
- func (c *LoadOnceCache) LoadFromCacheOrRawDisk(file string) (interface{}, []byte, error)
- func (c *LoadOnceCache) Put(key string, data interface{}, ttl time.Duration)
- func (c *LoadOnceCache) Remove(key string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadGeoIPFromDATByTags ¶
func LoadGeoSiteFromDAT ¶
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)
Click to show internal directories.
Click to hide internal directories.