redis

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModeLocal    = "local"
	ModeSentinel = "sentinel"
	ModeCluster  = "cluster"
)

Variables

View Source
var (
	ConfMode = config.Key("redis", "mode")

	ConfAddr = config.Key("redis", "addr")

	ConfDatabase = config.Key("redis", "database")

	ConfUsername = config.Key("redis", "username")

	ConfPassword = config.Key("redis", "password")
)
View Source
var (
	ModuleName = dep.Name("wk", "redis")
)

Functions

func Module

func Module() dep.Module

Types

type Client

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

func (*Client) Ping

func (c *Client) Ping(ctx context.Context) error

type Configuration

type Configuration struct {
	Mode    string
	Servers []ServerConfiguration
}

func ConfigFrom

func ConfigFrom(ctx context.Context, conf config.Config) (*Configuration, error)

type ServerConfiguration

type ServerConfiguration struct {
	Addr     string
	Database int
	Password string
	Username string
}

Jump to

Keyboard shortcuts

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