Documentation ¶
Index ¶
- type Cache
- type Client
- type LoggerHook
- func (h LoggerHook) AfterProcess(ctx context.Context, cmd redis.Cmder) error
- func (h LoggerHook) AfterProcessPipeline(ctx context.Context, cmds []redis.Cmder) error
- func (h LoggerHook) BeforeProcess(ctx context.Context, cmd redis.Cmder) (context.Context, error)
- func (h LoggerHook) BeforeProcessPipeline(ctx context.Context, cmds []redis.Cmder) (context.Context, error)
- type NewRelicHook
- func (h NewRelicHook) AfterProcess(ctx context.Context, cmd redis.Cmder) error
- func (h NewRelicHook) AfterProcessPipeline(ctx context.Context, cmds []redis.Cmder) error
- func (h NewRelicHook) BeforeProcess(ctx context.Context, cmd redis.Cmder) (context.Context, error)
- func (h NewRelicHook) BeforeProcessPipeline(ctx context.Context, cmds []redis.Cmder) (context.Context, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache is a logged and instrumented wrapper around a redis client.
type LoggerHook ¶
type LoggerHook struct { }
LoggerHook is used to log all calls to redis.
func (LoggerHook) AfterProcess ¶
func (h LoggerHook) AfterProcess(ctx context.Context, cmd redis.Cmder) error
AfterProcess is called after the call to redis for a single command.
func (LoggerHook) AfterProcessPipeline ¶
func (h LoggerHook) AfterProcessPipeline(ctx context.Context, cmds []redis.Cmder) error
AfterProcessPipeline is called after the call to redis for a group of pipelined commands.
func (LoggerHook) BeforeProcess ¶
BeforeProcess is called before the call to redis for a single command.
func (LoggerHook) BeforeProcessPipeline ¶
func (h LoggerHook) BeforeProcessPipeline(ctx context.Context, cmds []redis.Cmder) (context.Context, error)
BeforeProcessPipeline is called before the call to redis for a group of pipelined commands.
type NewRelicHook ¶
type NewRelicHook struct { }
NewRelicHook is used to instrument all calls to redis using a newrelic segment.
func (NewRelicHook) AfterProcess ¶
func (h NewRelicHook) AfterProcess(ctx context.Context, cmd redis.Cmder) error
AfterProcess is called after the call to redis for a single command.
func (NewRelicHook) AfterProcessPipeline ¶
func (h NewRelicHook) AfterProcessPipeline(ctx context.Context, cmds []redis.Cmder) error
AfterProcessPipeline is called after the call to redis for a group of pipelined commands.
func (NewRelicHook) BeforeProcess ¶
BeforeProcess is called before the call to redis for a single command.
func (NewRelicHook) BeforeProcessPipeline ¶
func (h NewRelicHook) BeforeProcessPipeline(ctx context.Context, cmds []redis.Cmder) (context.Context, error)
BeforeProcessPipeline is called before the call to redis for a group of pipelined commands.