rediscache

package
v0.1.4-alpha Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Client

func Client(config *Configuration) *redis.Client

Client creates a redis client from the configuration struct.

func Instance

func Instance() *redis.Client

Instance returns a singleton instance with a configuration from environment variables.

Types

type Configuration

type Configuration struct {
	Host     string
	Port     string
	Password string
}

Configuration defines the connection configuration for Redis.

func NewConfigurationFromEnv

func NewConfigurationFromEnv() *Configuration

NewConfigurationFromEnv creates a new configuration from environment variables.

func (*Configuration) Address

func (c *Configuration) Address() string

Address gets the string representation with the host and port.

Jump to

Keyboard shortcuts

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