Documentation ¶
Index ¶
- type MemoryCache
- type RedisCache
- func (c *RedisCache) Close() error
- func (c *RedisCache) Collectors() []prometheus.Collector
- func (c *RedisCache) Get(ctx context.Context, k []byte) ([]byte, Times)
- func (c *RedisCache) Ping(ctx context.Context) (time.Duration, error)
- func (c *RedisCache) Store(k []byte, v []byte, t Times, setNX bool)
- type Times
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemoryCache ¶
type MemoryCache struct {
// contains filtered or unexported fields
}
func NewMemoryCache ¶
func NewMemoryCache(size int) (*MemoryCache, error)
func (*MemoryCache) Collectors ¶
func (c *MemoryCache) Collectors() []prometheus.Collector
type RedisCache ¶
type RedisCache struct {
// contains filtered or unexported fields
}
func NewRedisCache ¶
func NewRedisCache(u string, logger *zerolog.Logger) (*RedisCache, error)
func (*RedisCache) Collectors ¶
func (c *RedisCache) Collectors() []prometheus.Collector
Click to show internal directories.
Click to hide internal directories.