redis

package
v0.0.0-...-1907afb Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is a redis client

func NewClient

func NewClient(port string) (client Client)

NewClient returns a new redis client. It does not ensure that the client has connectivity.

func (Client) GetInt

func (c Client) GetInt(key string) (val int, err error)

GetInt gets an integer value for a given key.

func (Client) GetString

func (c Client) GetString(key string) (val string, err error)

GetString gets a string for a given key.

func (Client) SetString

func (c Client) SetString(key string, value string) error

SetString sets a string for a given key.

type Redis

type Redis interface {
	SetString(string, string) error
	GetInt(string) (int, error)
	GetString(string) (string, error)
}

Redis is an interface representing a redis Client

Jump to

Keyboard shortcuts

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