bricks: github.com/pace/bricks/backend/redis Index | Files

package redis

import "github.com/pace/bricks/backend/redis"

Package redis helps creating redis connection pools

Index

Package Files

health_redis.go redis.go

func Client Uses

func Client(overwriteOpts ...func(*redis.Options)) *redis.Client

Client with environment based configuration

func ClusterClient Uses

func ClusterClient() *redis.ClusterClient

ClusterClient with environment based configuration

func CustomClient Uses

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

CustomClient with passed configuration

func CustomClusterClient Uses

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

CustomClusterClient with passed configuration

func WithClusterContext Uses

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

WithClusterContext adds a logging and tracing wrapper to the passed client

func WithContext Uses

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

WithContext adds a logging and tracing wrapper to the passed client

type HealthCheck Uses

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 Uses

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 redis imports 10 packages (graph) and is imported by 2 packages. Updated 2020-12-01. Refresh now. Tools for package owners.