Back to godoc.org

Package redis

v0.1.74
Latest Go to latest

The latest major version is .

Published: 4 days ago | License: MIT | Module: github.com/pace/bricks

Overview

Package redis helps creating redis connection pools

Index

func Client

func Client() *redis.Client

Client with environment based configuration

func ClusterClient

func ClusterClient() *redis.ClusterClient

ClusterClient with environment based configuration

func CustomClient

func CustomClient(opts *redis.Options) *redis.Client

CustomClient with passed configuration

func CustomClusterClient

func CustomClusterClient(opts *redis.ClusterOptions) *redis.ClusterClient

CustomClusterClient with passed configuration

func WithClusterContext

func WithClusterContext(ctx context.Context, c *redis.ClusterClient) *redis.ClusterClient

WithClusterContext adds a logging and tracing wrapper to the passed client

func WithContext

func WithContext(ctx context.Context, c *redis.Client) *redis.Client

WithContext adds a logging and tracing wrapper to the passed client

type HealthCheck

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

HealthCheck checks the state of a redis connection. It must not be changed after it was registered as a health check.

func (*HealthCheck) HealthCheck

func (h *HealthCheck) HealthCheck(ctx context.Context) servicehealthcheck.HealthCheckResult

HealthCheck checks if the redis is healthy. If the last result is outdated, redis is checked for writeability and readability, otherwise return the old result

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier