cache

package
v0.0.0-...-9e48597 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IP_ZONE_HASH_KEY = "ip_zone"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	IPZoneCache *IPZoneCache
}

func NewCache

func NewCache(redisDriver *redis.Client, logger *zap.SugaredLogger) *Cache

type IPZoneCache

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

func NewIPZoneCache

func NewIPZoneCache(cache *redis.Client, logger *zap.SugaredLogger) *IPZoneCache

func (*IPZoneCache) GetIPZone

func (c *IPZoneCache) GetIPZone(ip string) (string, error)

func (*IPZoneCache) SetIPZone

func (c *IPZoneCache) SetIPZone(ip string, zone string) error

Jump to

Keyboard shortcuts

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