redis

package
v1.0.0-beta.145 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(o Options, opts ...Option) (*redis.Client, error)

NewClient returns a new redis.Client initialized by using configuration parameters provided in Options.

Types

type Config

type Config struct {
	Address  string
	Database int
	Username string
	Password string
	Sentinel struct {
		Enabled    bool
		MasterName string
	}
	TLS struct {
		Enabled            bool
		InsecureSkipVerify bool
	}
}

Config stores the user provided configuration parameters

type Option

type Option func(*Options)

func WithMeterProvider

func WithMeterProvider(p metric.MeterProvider) Option

WithMeterProvider allows to instrument redis.Client with custom metrics provider

func WithTracingProvider

func WithTracingProvider(p trace.TracerProvider) Option

WithTracingProvider allows to instrument redis.Client with custom tracing provider

type Options

type Options struct {
	Config

	TracingProvider trace.TracerProvider
	MeterProvider   metric.MeterProvider
}

Options stores all the input parameters to initialize new redis.Client

Jump to

Keyboard shortcuts

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