ssdbgo

package module
v0.0.0-...-7c0b962 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2014 License: MIT Imports: 9 Imported by: 1

README

ssdbgo

Documentation

Index

Constants

View Source
const (
	OK        = "ok"
	NOT_FOUND = "not_found"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func Connect

func Connect(ip string, port int, pool *Pool) (*Client, error)

func (*Client) Close

func (self *Client) Close() error

func (*Client) Del

func (c *Client) Del(key string) (_ interface{}, rErr error)

func (*Client) Do

func (c *Client) Do(args ...interface{}) (_ []string, rErr error)

func (*Client) Get

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

TODO: Will somebody write addition semantic methods?

func (*Client) HGet

func (c *Client) HGet(key string, subKey string, obj interface{}) (rErr error)

func (*Client) HGetMap

func (c *Client) HGetMap(key string, mp map[string]interface{}) (rErr error)

func (*Client) HGetMapAll

func (c *Client) HGetMapAll(key string, mp interface{}) (rErr error)

func (*Client) HGetStruct

func (c *Client) HGetStruct(key string, objPtr interface{}) (rErr error)

func (*Client) HSet

func (c *Client) HSet(key string, subKey string, obj interface{}) (rErr error)

func (*Client) HSetMap

func (c *Client) HSetMap(key string, mp map[string]interface{}) (rErr error)

func (*Client) HSetStruct

func (c *Client) HSetStruct(key string, obj interface{}) (rErr error)

func (*Client) Set

func (c *Client) Set(key string, val string) (_ interface{}, rErr error)

type Pool

type Pool struct {
	Ip      string
	Port    int
	MaxIdle uint32
	TimeOut time.Duration
	// contains filtered or unexported fields
}

func NewPool

func NewPool(ip string, port int, maxIdel uint32, timeOutSec uint32) *Pool

func (*Pool) Get

func (self *Pool) Get() (*Client, error)

func (*Pool) Put

func (self *Pool) Put(client *Client)

Jump to

Keyboard shortcuts

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