Documentation ¶
Index ¶
- type Adapter
- type Client
- type ClientOption
- func WithAdapter(a Adapter) ClientOption
- func WithExpire(ttl time.Duration) ClientOption
- func WithLogger(logger logging.Logger) ClientOption
- func WithMethods(methods ...string) ClientOption
- func WithOptions(options ...ClientOption) ClientOption
- func WithStatusCode(code int, ttl time.Duration) ClientOption
- type MemCacheAdapter
- type NopClient
- type RedisCacheAdapter
- type RedisRingOptions
- type Response
- type Wrapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(opts ...ClientOption) (*Client, error)
func (*Client) WrapHandlerFunc ¶
func (c *Client) WrapHandlerFunc(handlerFunc http.HandlerFunc) http.HandlerFunc
type ClientOption ¶
func WithAdapter ¶
func WithAdapter(a Adapter) ClientOption
func WithExpire ¶
func WithExpire(ttl time.Duration) ClientOption
func WithLogger ¶
func WithLogger(logger logging.Logger) ClientOption
func WithMethods ¶
func WithMethods(methods ...string) ClientOption
func WithOptions ¶
func WithOptions(options ...ClientOption) ClientOption
func WithStatusCode ¶
func WithStatusCode(code int, ttl time.Duration) ClientOption
type MemCacheAdapter ¶
type MemCacheAdapter struct {
// contains filtered or unexported fields
}
func NewMemCacheAdapter ¶
func NewMemCacheAdapter(size int) *MemCacheAdapter
func (*MemCacheAdapter) Remove ¶
func (a *MemCacheAdapter) Remove(key string)
type NopClient ¶
type NopClient struct { }
func NewNopClient ¶
func NewNopClient() *NopClient
func (NopClient) WrapHandlerFunc ¶
func (NopClient) WrapHandlerFunc(handlerFunc http.HandlerFunc) http.HandlerFunc
type RedisCacheAdapter ¶
type RedisCacheAdapter struct {
// contains filtered or unexported fields
}
func NewRedisCacheAdapter ¶
func NewRedisCacheAdapter(opt *RedisRingOptions) *RedisCacheAdapter
func (*RedisCacheAdapter) Remove ¶
func (a *RedisCacheAdapter) Remove(key string)
type RedisRingOptions ¶
type RedisRingOptions redis.RingOptions
type Wrapper ¶
type Wrapper interface {
WrapHandlerFunc(handlerFunc http.HandlerFunc) http.HandlerFunc
}
Click to show internal directories.
Click to hide internal directories.