otredis

package module
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2020 License: MIT Imports: 8 Imported by: 0

README

opentracing-go-redis

Go Report Card license

OVERVIEW

OpenTracing before and after hook for go-redis v7.
It's to support redis.Client, redis.ClusterClient, redis.Ring.

HOW TO USE

// select *redis.ClusterClient or *redis.Ring or *redis.Client  
var client redis.UniversalClient

// wrap redis client
ctx := context.Background()
client := otredis.WrapClient(ctx, client)

// call redis command
client.Get("test")

LICENSE

This project is following The MIT.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UniversalClient

type UniversalClient interface {
	redis.UniversalClient
	// contains filtered or unexported methods
}

func WrapClient

func WrapClient(ctx context.Context, client redis.UniversalClient) (UniversalClient, error)

WrapClient is to wrap context and to add hooks for opentracing.

Jump to

Keyboard shortcuts

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