nrredis

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: Apache-2.0, MIT Imports: 5 Imported by: 0

README

Documentation

Overview

Package nrredis is for integrating New Relic into Redis

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DBName       string
	Host         string
	PortPathOrID string
}

Config contains metadata to send to New Relic.

type Option

type Option func(*Config)

Option configures a Config object.

func WithDBName

func WithDBName(dbName string) Option

WithDBName sets a DB name.

func WithHost

func WithHost(host string) Option

WithHost sets a DB host.

func WithPortPathOrID

func WithPortPathOrID(v string) Option

WithPortPathOrID sets a DB port, path or id.

type Pool

type Pool interface {
	ActiveCount() int
	Close() error
	Get() redis.Conn
	GetContext(ctx context.Context) (redis.Conn, error)
	IdleCount() int
	Stats() redis.PoolStats
}

Pool is an interface for representing a pool of Redis connections

func Wrap

func Wrap(p Pool, opts ...Option) Pool

Wrap will wrap the existing pool

Jump to

Keyboard shortcuts

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