outsideatom

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2022 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRedisNotConfig = errors.New("no configuration provided")
)

Functions

This section is empty.

Types

type Outsider added in v0.5.1

type Outsider interface {
	atom.Dependency
}

type RedisClient

type RedisClient interface {
	Outsider
	Context() context.Context
	Handler() *redis.Client
}

func NewRedisClient

func NewRedisClient(c RedisConfig) (RedisClient, error)

NewRedisClient create a new redis connection

type RedisConfig added in v0.5.0

type RedisConfig struct {
	Host     string `mapstructure:"host"`
	Port     string `mapstructure:"port"`
	Username string `mapstructure:"username"`
	Password string `mapstructure:"password"`
	Database int    `mapstructure:"database"`
}

func NewRedisConfigDefaults added in v0.5.1

func NewRedisConfigDefaults() *RedisConfig

func (*RedisConfig) Validate added in v0.5.1

func (c *RedisConfig) Validate() error

Jump to

Keyboard shortcuts

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