Documentation
¶
Index ¶
- Constants
- func ReflectSaveEntityArgs(rev reflect.Value) []interface{}
- type Client
- func (c *Client) BeginTrans()
- func (c *Client) Connect() error
- func (c *Client) DiscardTrans() error
- func (c *Client) Do(cmd string, args ...interface{}) *Reply
- func (c *Client) DoWithoutLog(cmd string, args ...interface{}) *Reply
- func (c *Client) ExecTrans() ([]*Reply, error)
- func (c *Client) FlushCmdQueue() ([]*Reply, []int)
- func (c *Client) Free()
- func (c *Client) IsConnected() bool
- func (c *Client) Send(cmd string, args ...interface{})
- func (c *Client) SetLogger(logger golog.ILogger) *Client
- func (c *Client) SetTraceId(traceId []byte) *Client
- type Cmd
- type Config
- type NewClientFunc
- type Pool
- type PoolConfig
- type Reply
- func (r *Reply) ArrReplyIsNil() bool
- func (r *Reply) Bool() (bool, error)
- func (r *Reply) ByteSlices() ([][]byte, error)
- func (r *Reply) Bytes() ([]byte, error)
- func (r *Reply) Float64() (float64, error)
- func (r *Reply) Int() (int, error)
- func (r *Reply) Int64() (int64, error)
- func (r *Reply) Int64Map() (map[string]int64, error)
- func (r *Reply) Int64s() ([]int64, error)
- func (r *Reply) Ints() ([]int, error)
- func (r *Reply) SimpleReplyIsNil() bool
- func (r *Reply) String() (string, error)
- func (r *Reply) StringMap() (map[string]string, error)
- func (r *Reply) Strings() ([]string, error)
- func (r *Reply) Struct(s interface{}) error
- func (r *Reply) Uint64() (uint64, error)
- type SimpleOrm
- func (so *SimpleOrm) Client() *Client
- func (so *SimpleOrm) Del(key string) error
- func (so *SimpleOrm) GetAsJson(key string, value interface{}) (bool, error)
- func (so *SimpleOrm) GetEntity(key string, entityPtr interface{}) (bool, error)
- func (so *SimpleOrm) PutBackClient()
- func (so *SimpleOrm) Renew(traceId []byte, pool *Pool) *SimpleOrm
- func (so *SimpleOrm) SaveAsJson(key string, value interface{}, expireSeconds int64) error
- func (so *SimpleOrm) SaveEntity(key string, entity interface{}, expireSeconds int64) error
Constants ¶
View Source
const ( DefaultConnectTimeout = 10 * time.Second DefaultReadTimeout = 10 * time.Second DefaultWriteTimeout = 10 * time.Second )
View Source
const (
FiledTag = "redis"
)
Variables ¶
This section is empty.
Functions ¶
func ReflectSaveEntityArgs ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) BeginTrans ¶
func (c *Client) BeginTrans()
func (*Client) DiscardTrans ¶
func (*Client) DoWithoutLog ¶
func (*Client) FlushCmdQueue ¶
func (*Client) IsConnected ¶
func (*Client) SetTraceId ¶
type Config ¶
type NewClientFunc ¶
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
func NewPool ¶
func NewPool(config *PoolConfig) *Pool
type PoolConfig ¶ added in v1.2.0
type Reply ¶
type Reply struct { Err error // contains filtered or unexported fields }
func (*Reply) ArrReplyIsNil ¶
func (*Reply) ByteSlices ¶
func (*Reply) SimpleReplyIsNil ¶
type SimpleOrm ¶
type SimpleOrm struct {
// contains filtered or unexported fields
}
func NewSimpleOrm ¶
func (*SimpleOrm) PutBackClient ¶
func (so *SimpleOrm) PutBackClient()
func (*SimpleOrm) SaveAsJson ¶
Click to show internal directories.
Click to hide internal directories.