Documentation
¶
Index ¶
- type Option
- type Wrapper
- func (w *Wrapper) AllowRateLimit(ctx context.Context, key string, interval time.Duration, burst int, ...) (bool, error)
- func (w *Wrapper) Get(_ context.Context, key string) (string, bool, error)
- func (w *Wrapper) Invalidate(_ context.Context, key string) error
- func (w *Wrapper) Ping(ctx context.Context) error
- func (w *Wrapper) Set(_ context.Context, key string, value string, ttl time.Duration) error
- func (w *Wrapper) SetIfAbsent(_ context.Context, key string, value string, ttl time.Duration) (bool, error)
- func (w *Wrapper) Shutdown(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*config)
func WithCapacity ¶
WithCapacity sets the maximum number of entries. Zero disables the limit.
func WithMaxCostBytes ¶
WithMaxCostBytes sets the maximum combined size of cached keys and values. Zero disables the limit; cache bookkeeping overhead is not included.
type Wrapper ¶
type Wrapper struct {
// contains filtered or unexported fields
}
func (*Wrapper) AllowRateLimit ¶
func (*Wrapper) SetIfAbsent ¶
Click to show internal directories.
Click to hide internal directories.