Documentation ¶
Index ¶
- type ClusterInterface
- func (_m *ClusterInterface) GetConnByAddr(addr string) (redis.Conn, bool, error)
- func (_m *ClusterInterface) GetMasterFromSlaveIP(slaveIP string) (string, error)
- func (_m *ClusterInterface) GetMasterIPs() []string
- func (_m *ClusterInterface) GetNodeIPBySlot(slot int, readOnly bool) (string, error)
- func (_m *ClusterInterface) GetSlaveIPs() []string
- func (_m *ClusterInterface) HandleError(err error)
- func (_m *ClusterInterface) Slot(key string) int
- type Conn
- type ConnWithTimeout
- func (_m *ConnWithTimeout) Close() error
- func (_m *ConnWithTimeout) Do(commandName string, args ...interface{}) (interface{}, error)
- func (_m *ConnWithTimeout) DoWithTimeout(timeout time.Duration, commandName string, args ...interface{}) (interface{}, error)
- func (_m *ConnWithTimeout) Err() error
- func (_m *ConnWithTimeout) Flush() error
- func (_m *ConnWithTimeout) Receive() (interface{}, error)
- func (_m *ConnWithTimeout) ReceiveWithTimeout(timeout time.Duration) (interface{}, error)
- func (_m *ConnWithTimeout) Send(commandName string, args ...interface{}) error
- type RedisClient
- func (_m *RedisClient) GetConn(host string) (redis.Conn, bool, error)
- func (_m *RedisClient) GetConnWithTimeout(host string) (redis.ConnWithTimeout, bool, error)
- func (_m *RedisClient) GetHosts() ([]string, []string)
- func (_m *RedisClient) GetMasterFromSlaveIP(slaveIP string) (string, error)
- func (_m *RedisClient) GetMaxConn() int
- func (_m *RedisClient) GetNodeIPByKey(key string, readOnly bool) (string, error)
- func (_m *RedisClient) HandleError(err error)
- type RedisPipeline
- type RedisPipelineSession
- func (_m *RedisPipelineSession) Execute() ([]*redispipeline.CommandResponse, error)
- func (_m *RedisPipelineSession) PushCommand(command string, args ...interface{}) redispipeline.RedisPipelineSession
- func (_m *RedisPipelineSession) PushCommandReadOnly(command string, args ...interface{}) redispipeline.RedisPipelineSession
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterInterface ¶
ClusterInterface is an autogenerated mock type for the ClusterInterface type
func (*ClusterInterface) GetConnByAddr ¶
GetConnByAddr provides a mock function with given fields: addr
func (*ClusterInterface) GetMasterFromSlaveIP ¶
func (_m *ClusterInterface) GetMasterFromSlaveIP(slaveIP string) (string, error)
GetMasterFromSlaveIP provides a mock function with given fields: slaveIP
func (*ClusterInterface) GetMasterIPs ¶
func (_m *ClusterInterface) GetMasterIPs() []string
GetMasterIPs provides a mock function with given fields:
func (*ClusterInterface) GetNodeIPBySlot ¶
func (_m *ClusterInterface) GetNodeIPBySlot(slot int, readOnly bool) (string, error)
GetNodeIPBySlot provides a mock function with given fields: slot, readOnly
func (*ClusterInterface) GetSlaveIPs ¶
func (_m *ClusterInterface) GetSlaveIPs() []string
GetSlaveIPs provides a mock function with given fields:
func (*ClusterInterface) HandleError ¶
func (_m *ClusterInterface) HandleError(err error)
HandleError provides a mock function with given fields: err
func (*ClusterInterface) Slot ¶
func (_m *ClusterInterface) Slot(key string) int
Slot provides a mock function with given fields: key
type Conn ¶
Conn is an autogenerated mock type for the Conn type
type ConnWithTimeout ¶
ConnWithTimeout is an autogenerated mock type for the ConnWithTimeout type
func (*ConnWithTimeout) Close ¶
func (_m *ConnWithTimeout) Close() error
Close provides a mock function with given fields:
func (*ConnWithTimeout) Do ¶
func (_m *ConnWithTimeout) Do(commandName string, args ...interface{}) (interface{}, error)
Do provides a mock function with given fields: commandName, args
func (*ConnWithTimeout) DoWithTimeout ¶
func (_m *ConnWithTimeout) DoWithTimeout(timeout time.Duration, commandName string, args ...interface{}) (interface{}, error)
DoWithTimeout provides a mock function with given fields: timeout, commandName, args
func (*ConnWithTimeout) Err ¶
func (_m *ConnWithTimeout) Err() error
Err provides a mock function with given fields:
func (*ConnWithTimeout) Flush ¶
func (_m *ConnWithTimeout) Flush() error
Flush provides a mock function with given fields:
func (*ConnWithTimeout) Receive ¶
func (_m *ConnWithTimeout) Receive() (interface{}, error)
Receive provides a mock function with given fields:
func (*ConnWithTimeout) ReceiveWithTimeout ¶
func (_m *ConnWithTimeout) ReceiveWithTimeout(timeout time.Duration) (interface{}, error)
ReceiveWithTimeout provides a mock function with given fields: timeout
func (*ConnWithTimeout) Send ¶
func (_m *ConnWithTimeout) Send(commandName string, args ...interface{}) error
Send provides a mock function with given fields: commandName, args
type RedisClient ¶
RedisClient is an autogenerated mock type for the RedisClient type
func (*RedisClient) GetConnWithTimeout ¶
func (_m *RedisClient) GetConnWithTimeout(host string) (redis.ConnWithTimeout, bool, error)
GetConnWithTimeout provides a mock function with given fields: host
func (*RedisClient) GetHosts ¶
func (_m *RedisClient) GetHosts() ([]string, []string)
GetHosts provides a mock function with given fields:
func (*RedisClient) GetMasterFromSlaveIP ¶
func (_m *RedisClient) GetMasterFromSlaveIP(slaveIP string) (string, error)
GetMasterFromSlaveIP provides a mock function with given fields: slaveIP
func (*RedisClient) GetMaxConn ¶
func (_m *RedisClient) GetMaxConn() int
GetMaxConn provides a mock function with given fields:
func (*RedisClient) GetNodeIPByKey ¶
func (_m *RedisClient) GetNodeIPByKey(key string, readOnly bool) (string, error)
GetNodeIPByKey provides a mock function with given fields: key, readOnly
func (*RedisClient) HandleError ¶
func (_m *RedisClient) HandleError(err error)
HandleError provides a mock function with given fields: err
type RedisPipeline ¶
RedisPipeline is an autogenerated mock type for the RedisPipeline type
func (*RedisPipeline) NewSession ¶
func (_m *RedisPipeline) NewSession(ctx context.Context) redispipeline.RedisPipelineSession
NewSession provides a mock function with given fields: ctx
type RedisPipelineSession ¶
RedisPipelineSession is an autogenerated mock type for the RedisPipelineSession type
func (*RedisPipelineSession) Execute ¶
func (_m *RedisPipelineSession) Execute() ([]*redispipeline.CommandResponse, error)
Execute provides a mock function with given fields:
func (*RedisPipelineSession) PushCommand ¶
func (_m *RedisPipelineSession) PushCommand(command string, args ...interface{}) redispipeline.RedisPipelineSession
PushCommand provides a mock function with given fields: command, args
func (*RedisPipelineSession) PushCommandReadOnly ¶
func (_m *RedisPipelineSession) PushCommandReadOnly(command string, args ...interface{}) redispipeline.RedisPipelineSession
PushCommandReadOnly provides a mock function with given fields: command, args