cmargin

package
v0.0.0-...-28fadcf Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package cmargin implements a client for margin-cache

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Addr        string
	Db          int
	Password    string
	MaxPoolSize int
	// contains filtered or unexported fields
}

Client defines fields of client

func (*Client) Append

func (client *Client) Append(key string, val []byte) error

func (*Client) Auth

func (client *Client) Auth(password string) error

func (*Client) Blpop

func (client *Client) Blpop(keys []string, timeoutSecs uint) (*string, []byte, error)

func (*Client) Brpop

func (client *Client) Brpop(keys []string, timeoutSecs uint) (*string, []byte, error)

func (*Client) Close

func (c *Client) Close()

func (*Client) Dbsize

func (client *Client) Dbsize() (int, error)

func (*Client) Decr

func (client *Client) Decr(key string) (int64, error)

func (*Client) Decrby

func (client *Client) Decrby(key string, val int64) (int64, error)

func (*Client) Del

func (client *Client) Del(key string) (bool, error)

Del send the del key command

func (*Client) Exists

func (client *Client) Exists(key string) (bool, error)

func (*Client) Expire

func (client *Client) Expire(key string, time int64) (bool, error)

Expire expire the key

func (*Client) Flush

func (client *Client) Flush(all bool) error

func (*Client) Get

func (client *Client) Get(key string) ([]byte, error)

Get get a key's value

func (*Client) Getset

func (client *Client) Getset(key string, val []byte) ([]byte, error)

Getset get a key's value,if no exists set key/value

func (*Client) Hdel

func (client *Client) Hdel(key string, field string) (bool, error)

func (*Client) Hdestroy

func (client *Client) Hdestroy(key string) error

Hdestroy del the hash key

func (*Client) Hexists

func (client *Client) Hexists(key string, field string) (bool, error)

func (*Client) Hget

func (client *Client) Hget(key string, field string) ([]byte, error)

func (*Client) Hgetall

func (client *Client) Hgetall(key string, val interface{}) error

func (*Client) Hincrby

func (client *Client) Hincrby(key string, field string, val int64) (int64, error)

func (*Client) Hkeys

func (client *Client) Hkeys(key string) ([]string, error)

func (*Client) Hlen

func (client *Client) Hlen(key string) (int, error)

func (*Client) Hmget

func (client *Client) Hmget(key string, fields ...string) ([][]byte, error)

func (*Client) Hmset

func (client *Client) Hmset(key string, mapping interface{}) error

func (*Client) Hset

func (client *Client) Hset(key string, field string, val []byte) (bool, error)

func (*Client) Hsetex

func (client *Client) Hsetex(key string, field string, ex int, val []byte) (bool, error)

func (*Client) Hvals

func (client *Client) Hvals(key string) ([][]byte, error)

func (*Client) Incr

func (client *Client) Incr(key string) (int64, error)

Incr increment the key's value with 1

func (*Client) Incrby

func (client *Client) Incrby(key string, val int64) (int64, error)

Incrby increment the key's value with num

func (*Client) Keys

func (client *Client) Keys(pattern string) ([]string, error)

Keys get all the keys

func (*Client) Lindex

func (client *Client) Lindex(key string, index int) ([]byte, error)

func (*Client) Llen

func (client *Client) Llen(key string) (int, error)

func (*Client) Lpop

func (client *Client) Lpop(key string) ([]byte, error)

func (*Client) Lpush

func (client *Client) Lpush(key string, val []byte) error

func (*Client) Lrange

func (client *Client) Lrange(key string, start int, end int) ([][]byte, error)

func (*Client) Lrem

func (client *Client) Lrem(key string, count int, value []byte) (int, error)

func (*Client) Lset

func (client *Client) Lset(key string, index int, value []byte) error

func (*Client) Ltrim

func (client *Client) Ltrim(key string, start int, end int) error

func (*Client) Mget

func (client *Client) Mget(keys ...string) ([][]byte, error)

Mget get keys

func (*Client) Move

func (client *Client) Move(key string, dbnum int) (bool, error)

func (*Client) Mset

func (client *Client) Mset(mapping map[string][]byte) error

Mset set keys

func (*Client) Msetnx

func (client *Client) Msetnx(mapping map[string][]byte) (bool, error)

Msetnx set keys with expiration

func (*Client) Ping

func (client *Client) Ping() (int64, error)

Ping checks the connection and get the server's startup time

func (*Client) Randomkey

func (client *Client) Randomkey() (string, error)

func (*Client) Rename

func (client *Client) Rename(src string, dst string) error

func (*Client) Renamenx

func (client *Client) Renamenx(src string, dst string) (bool, error)

func (*Client) Rpop

func (client *Client) Rpop(key string) ([]byte, error)

func (*Client) Rpoplpush

func (client *Client) Rpoplpush(src string, dst string) ([]byte, error)

func (*Client) Rpush

func (client *Client) Rpush(key string, val []byte) error

func (*Client) Sadd

func (client *Client) Sadd(key string, value []byte) (bool, error)

func (*Client) Scard

func (client *Client) Scard(key string) (int, error)

func (*Client) Sdiff

func (client *Client) Sdiff(key1 string, keys []string) ([][]byte, error)

func (*Client) Sdiffstore

func (client *Client) Sdiffstore(dst string, key1 string, keys []string) (int, error)

func (*Client) Set

func (client *Client) Set(key string, val []byte) error

Set set key/value

func (*Client) Setex

func (client *Client) Setex(key string, time int64, val []byte) error

Setex set a key with expiration

func (*Client) Setnx

func (client *Client) Setnx(key string, val []byte) (bool, error)

Setnx set a key with expiration

func (*Client) Sinter

func (client *Client) Sinter(keys ...string) ([][]byte, error)

func (*Client) Sinterstore

func (client *Client) Sinterstore(dst string, keys ...string) (int, error)

func (*Client) Sismember

func (client *Client) Sismember(key string, value []byte) (bool, error)

func (*Client) Smembers

func (client *Client) Smembers(key string) ([][]byte, error)

func (*Client) Smove

func (client *Client) Smove(src string, dst string, val []byte) (bool, error)

func (*Client) Spop

func (client *Client) Spop(key string) ([]byte, error)

func (*Client) Srandmember

func (client *Client) Srandmember(key string) ([]byte, error)

func (*Client) Srem

func (client *Client) Srem(key string, value []byte) (bool, error)

func (*Client) Strlen

func (client *Client) Strlen(key string) (int, error)

func (*Client) Substr

func (client *Client) Substr(key string, start int, end int) ([]byte, error)

func (*Client) Sunion

func (client *Client) Sunion(keys ...string) ([][]byte, error)

func (*Client) Sunionstore

func (client *Client) Sunionstore(dst string, keys ...string) (int, error)

func (*Client) Ttl

func (client *Client) Ttl(key string) (int64, error)

func (*Client) Type

func (client *Client) Type(key string) (string, error)

Type checks the key's value type

Jump to

Keyboard shortcuts

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