thundragoredis

package
v2.3.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientWrapper

type ClientWrapper struct {
	*redis.Client
	// contains filtered or unexported fields
}

ClientWrapper wraps the *redis.Client to trace redis calls

func NewClient

func NewClient(opt *redis.Options) *ClientWrapper

NewClient returns a client to the Redis Server specified by Options and wrapped by thundra

func WrapClient

func WrapClient(c *redis.Client) *ClientWrapper

WrapClient wraps the given *redis.Clint and returns a new *ClientWrapper that can be usedas the redis client and traced by

func (*ClientWrapper) Context

func (cw *ClientWrapper) Context() context.Context

Context returns the current active context of the ClientWrapper

func (*ClientWrapper) Pipeline

func (cw *ClientWrapper) Pipeline() redis.Pipeliner

Pipeline creates a Pipeline from a ClientWrapper

func (*ClientWrapper) WithContext

func (cw *ClientWrapper) WithContext(ctx context.Context) *ClientWrapper

WithContext sets the given context to the ClientWrapper, so that new spans created using this context to have correct parent

type Pipeliner

type Pipeliner struct {
	redis.Pipeliner
	// contains filtered or unexported fields
}

Pipeliner is used to trace pipelines executed on a Redis server

func (*Pipeliner) Exec

func (p *Pipeliner) Exec() ([]redis.Cmder, error)

Exec calls Pipeline.Exec() ensuring that the resulting Redis calls are traced.

func (*Pipeliner) ExecWithContext

func (p *Pipeliner) ExecWithContext(ctx context.Context) ([]redis.Cmder, error)

ExecWithContext calls Pipeline.Exec(). It ensures that the resulting Redis calls are traced, and that emitted spans are children of the given Context.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL