Documentation ¶
Overview ¶
使用方法:
1. init
func init(){ InitRds(&RDSConfig{ Host:"127.0.0.1", Port:2379, Password:"123456", MaxIdle:10, MaxActive:10000, DB:0, }) }
2.调用操作方法 rc:=new(RdsCommon) val,err:=rc.Get(key) .... ...
Index ¶
- func InitRDSClient(rdc *RDSConfig) (err error)
- type RDSCommon
- func (m *RDSCommon) DEL(key string) (int64, error)
- func (m *RDSCommon) Exists(key string) (bool, error)
- func (m *RDSCommon) GetBit(key string, offset int64) (int, error)
- func (m *RDSCommon) GetHashAll(key string, obj interface{}) (err error)
- func (m *RDSCommon) GetHashInt(key string, v interface{}) (int64, error)
- func (m *RDSCommon) GetHashString(key string, v interface{}) (string, error)
- func (m *RDSCommon) GetInt64(key string) (v int64, err error)
- func (m *RDSCommon) GetString(key string) (v string, err error)
- func (m *RDSCommon) GetTTL(key string) (ttl int64, err error)
- func (m *RDSCommon) HashFieldExists(key, field string) (bool, error)
- func (m *RDSCommon) ReName(dist, newKey string) (err error)
- func (m *RDSCommon) SetBit(key string, offset int64, v int) (err error)
- func (m *RDSCommon) SetEXPIRE(key string, seconds int64) (bool, error)
- func (m *RDSCommon) SetEXPIREAT(key string, timestamp int64) (bool, error)
- func (m *RDSCommon) SetEx(key string, v interface{}, ex int64) (ok bool, err error)
- func (m *RDSCommon) SetHash(key string, v interface{}) (err error)
- func (m *RDSCommon) SetHashField(key string, field, v interface{}) (int64, error)
- func (m *RDSCommon) SetString(key string, v interface{}) (ok bool, err error)
- type RDSConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RDSCommon ¶
type RDSCommon struct {
// contains filtered or unexported fields
}
func (*RDSCommon) GetHashAll ¶
GetHash get hash all to obj
func (*RDSCommon) GetHashInt ¶
GetHashInt 获取hash里某个int值
func (*RDSCommon) GetHashString ¶
GetHashString 获取hash里某个int值
func (*RDSCommon) HashFieldExists ¶
HashFieldExists hash某个field是否存在
func (*RDSCommon) SetEXPIREAT ¶
SetEXPIREAT 设置过期时间(以时间戳的方式)
func (*RDSCommon) SetHashField ¶
SetHashField 设置某个field值
Click to show internal directories.
Click to hide internal directories.