mirror of
https://github.com/HDT3213/godis.git
synced 2025-10-05 00:42:43 +08:00
37 lines
638 B
Go
37 lines
638 B
Go
package redis
|
|
|
|
// Connection represents a connection with redis client
|
|
type Connection interface {
|
|
Write([]byte) (int, error)
|
|
Close() error
|
|
|
|
SetPassword(string)
|
|
GetPassword() string
|
|
|
|
// client should keep its subscribing channels
|
|
Subscribe(channel string)
|
|
UnSubscribe(channel string)
|
|
SubsCount() int
|
|
GetChannels() []string
|
|
|
|
InMultiState() bool
|
|
SetMultiState(bool)
|
|
GetQueuedCmdLine() [][][]byte
|
|
EnqueueCmd([][]byte)
|
|
ClearQueuedCmds()
|
|
GetWatching() map[string]uint32
|
|
AddTxError(err error)
|
|
GetTxErrors() []error
|
|
|
|
GetDBIndex() int
|
|
SelectDB(int)
|
|
|
|
SetSlave()
|
|
IsSlave() bool
|
|
|
|
SetMaster()
|
|
IsMaster() bool
|
|
|
|
Name() string
|
|
}
|