Documentation ¶
Overview ¶
Package ppredigo instruments the gomodule/redigo package (https://github.com/gomodule/redigo).
This package instruments the gomodule/redigo calls. Use the Dial, DialContext (or DialURL, DialURLContext) as the redis.Dial.
c, err := ppredigo.Dial("tcp", "127.0.0.1:6379")
It is necessary to pass the context containing the pinpoint.Tracer to redis.Conn.
ppredigo.WithContext(c, pinpoint.NewContext(context.Background(), tracer)) c.Do("SET", "vehicle", "truck")
or
redis.DoContext(c, pinpoint.NewContext(context.Background(), tracer), "GET", "vehicle")
or
c, err := ppredigo.DialContext(pinpoint.NewContext(context.Background(), tracer), "tcp", "127.0.0.1:6379") c.Do("SET", "vehicle", "truck")
Index ¶
- func Dial(network string, address string, options ...redis.DialOption) (redis.Conn, error)
- func DialContext(ctx context.Context, network string, address string, ...) (redis.Conn, error)
- func DialURL(rawurl string, options ...redis.DialOption) (redis.Conn, error)
- func DialURLContext(ctx context.Context, rawurl string, options ...redis.DialOption) (redis.Conn, error)
- func WithContext(c redis.Conn, ctx context.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DialContext ¶
func DialContext(ctx context.Context, network string, address string, options ...redis.DialOption) (redis.Conn, error)
DialContext wraps redis.DialContext and returns a new redis.Conn ready to instrument. It is possible to trace only when the given context contains a pinpoint.Tracer.
func DialURLContext ¶
func DialURLContext(ctx context.Context, rawurl string, options ...redis.DialOption) (redis.Conn, error)
DialURLContext wraps redis.DialURLContext and returns a new redis.Conn ready to instrument. It is possible to trace only when the given context contains a pinpoint.Tracer.
Types ¶
This section is empty.