redis

package
v0.0.0-...-7c51b95 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	Clients map[string]struct {
		Addr     string `json:"addr" yaml:"addr"`
		Password string `json:"password" yaml:"password"`
		DB       int    `json:"db" yaml:"db"`
	} `json:"clients" yaml:"clients"`

	Clusters map[string]struct {
		Addrs []string `json:"addrs" yaml:"addrs"`
	} `json:"clusters" yaml:"clusters"`
}

type Provider

type Provider struct {
	kernel.BaseProvider
}

func (Provider) Boot

func (Provider) Boot()

func (Provider) Name

func (Provider) Name() string

func (*Provider) Register

func (p *Provider) Register()

type Redis

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

func New

func New(config *Configuration) *Redis

func (*Redis) Client

func (r *Redis) Client(connection string) *redis2.Client

func (*Redis) Cluster

func (r *Redis) Cluster(cluster string) *redis2.ClusterClient

Jump to

Keyboard shortcuts

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