redis

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	HostName string
	Port     int
	Options  *redis.Options
}

type QueryLog

type QueryLog struct {
	Query    string      `json:"query"`
	Duration int64       `json:"duration"`
	Args     interface{} `json:"args,omitempty"`
}

QueryLog represents a logged Redis query.

type Redis

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

func NewClient

func NewClient(config Config, logger datasource.Logger) (*Redis, error)

NewClient return a redis client if connection is successful based on Config. In case of error, it returns an error as second parameter.

func (*Redis) HealthCheck

func (r *Redis) HealthCheck() datasource.Health

Jump to

Keyboard shortcuts

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