Documentation ¶
Overview ¶
Package cachewr provides a wrapper for RBLs that implements a memory cache system.
This package is a work in progress and makes no API stability promises.
Index ¶
- Constants
- func Builder(defaultCfg Config) xlistd.BuildWrapperFn
- type Config
- type Wrapper
- func (c *Wrapper) Check(ctx context.Context, name string, resource xlist.Resource) (xlist.Response, error)
- func (c *Wrapper) Class() string
- func (c *Wrapper) Flush()
- func (c *Wrapper) ID() string
- func (c *Wrapper) Ping() error
- func (c *Wrapper) Resources(ctx context.Context) ([]xlist.Resource, error)
Constants ¶
View Source
const WrapperClass = "cache"
WrapperClass registered
Variables ¶
This section is empty.
Functions ¶
func Builder ¶
func Builder(defaultCfg Config) xlistd.BuildWrapperFn
Builder returns a builder function.
Types ¶
type Config ¶
type Config struct { TTL int NegativeTTL int MinTTL, MaxTTL int Cleanups time.Duration RandomSeconds int ForceValidation bool }
Config options.
Click to show internal directories.
Click to hide internal directories.