redis

package
v0.0.0-...-83369f4 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package redis implements a driver for github.com/garyburd/redigo/redis

Index

Constants

This section is empty.

Variables

View Source
var (
	// Codec is the codec used to marshal/unmarshal interfaces into the byte slices required by the Diskv client
	Codec codec.Codec
)
View Source
var DefaultClient = New(":6379", 10)

DefaultClient provides a local Redis client with 10 maximum concurrent connections

Functions

This section is empty.

Types

type Client

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

func New

func New(addr string, maxConn int) *Client

New returns a Redist client to the given server with maxConn maximum concurrent connections

func (*Client) Close

func (c *Client) Close() error

Close returns the underlying Redis pool

func (*Client) Del

func (c *Client) Del(key string) error

Del implements the "cache.KeyStore".Del() interface

func (*Client) Exists

func (c *Client) Exists(key string) bool

Exists implements the "cache.Cache".Exists() interface

func (*Client) Get

func (c *Client) Get(key string, dstVal interface{}) error

Get implements the "cache.KeyStore".Get() interface

func (*Client) Pool

func (c *Client) Pool() *redis.Pool

Pool returns the underlying redis.Pool

func (*Client) Set

func (c *Client) Set(key string, val interface{}, exp time.Duration) error

Set implements the "cache.KeyStore".Set() interface

Jump to

Keyboard shortcuts

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