File: doc.go

package info (click to toggle)
golang-github-siddontang-goredis 0.0~git20150324.0.760763f-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 108 kB
  • sloc: makefile: 2
file content (34 lines) | stat: -rw-r--r-- 871 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Package goredis is a client for the redis and ledisdb.
//
// Client
//
// The client is the primary interface for redis. You must first create a client with redis address for working.
//
//     c := NewClient("127.0.0.1:6380")
//
// The most important function for client is Do function to send commands to remote server.
//
//     reply, err := c.Do("ping")
//
//     reply, err := c.Do("set", "key", "value")
//
//     reply, err := c.Do("get", "key")
//
// Connection
//
// You can use an independent connection to send commands.
//
//     //get a connection
//     conn, _ := c.Get()
//
//     //connection send command
//     conn.Do("ping")
//
// Reply Helper
//
// You can use reply helper to convert a reply to a specific type.
//
//     exists, err := Bool(c.Do("exists", "key"))
//
//     score, err := Int64(c.Do("zscore", "key", "member"))
package goredis