redis

package
v0.0.0-...-4a59535 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Module provided to fxlog
	// https://uber-go.github.io/fx/modules.html
	Module = fx.Module(
		"redisfx",
		redisProviders,
		redisInvokes,
	) //nolint:gochecknoglobals

)

Functions

func NewRedisClient

func NewRedisClient(cfg *RedisOptions) *redis.Client

func NewRedisHealthChecker

func NewRedisHealthChecker(client *redis.Client) contracts.Health

Types

type RedisHealthChecker

type RedisHealthChecker struct {
	// contains filtered or unexported fields
}

func (*RedisHealthChecker) CheckHealth

func (healthChecker *RedisHealthChecker) CheckHealth(ctx context.Context) error

func (*RedisHealthChecker) GetHealthName

func (healthChecker *RedisHealthChecker) GetHealthName() string

type RedisOptions

type RedisOptions struct {
	Host          string `mapstructure:"host"`
	Port          int    `mapstructure:"port"`
	Password      string `mapstructure:"password"`
	Database      int    `mapstructure:"database"`
	PoolSize      int    `mapstructure:"poolSize"`
	EnableTracing bool   `mapstructure:"enableTracing" default:"true"`
}

Jump to

Keyboard shortcuts

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