Documentation ¶
Overview ¶
Package ssdbclient Establish a connection with SSDB, parse the data and convert it into a regular format
与ssdb建立连接,对数据进行解析,转换成常规格式
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SSDBClient ¶
type SSDBClient struct { //The input parameter is converted to [] bytes, which by default is converted to json format //and can be modified to use a custom serialization //将输入参数成[]byte,默认会转换成json格式,可以修改这个参数以便使用自定义的序列化方式 EncodingFunc func(v interface{}) []byte // contains filtered or unexported fields }
SSDBClient ssdb client
func NewSSDBClient ¶
func NewSSDBClient(cfg *conf.Config) *SSDBClient
NewSSDBClient create new ssdb client
@param cfg initial parameters @return new *SSDBClient
使用配置创建一个新的SSDBClient,并不实际打开连接
func (*SSDBClient) Close ¶
func (s *SSDBClient) Close() error
Close close SSDBClient
@return error that may occur on shutdown. Return nil if successful shutdown
func (*SSDBClient) Do ¶
func (s *SSDBClient) Do(args ...interface{}) ([]string, error)
Do common function
@param args the input parameters @return []string output parameters @return error Possible errors
通用调用方法,所有操作ssdb的函数最终都是调用这个函数
func (*SSDBClient) IsOpen ¶
func (s *SSDBClient) IsOpen() bool
IsOpen check if the connection is open
@return bool returns true if the connection is open
是否为打开状态
func (*SSDBClient) Start ¶
func (s *SSDBClient) Start() error
Start start socket
@return error that may occur on startup. Return nil if successful startup
启动连接,并设置读写的缓存
Click to show internal directories.
Click to hide internal directories.