mirror of
https://github.com/HDT3213/godis.git
synced 2025-10-05 16:57:06 +08:00
27 lines
550 B
Go
27 lines
550 B
Go
package redis
|
|
|
|
// Connection represents a connection with redis client
|
|
type Connection interface {
|
|
Write([]byte) error
|
|
SetPassword(string)
|
|
GetPassword() string
|
|
|
|
// client should keep its subscribing channels
|
|
Subscribe(channel string)
|
|
UnSubscribe(channel string)
|
|
SubsCount() int
|
|
GetChannels() []string
|
|
|
|
// used for `Multi` command
|
|
InMultiState() bool
|
|
SetMultiState(bool)
|
|
GetQueuedCmdLine() [][][]byte
|
|
EnqueueCmd([][]byte)
|
|
ClearQueuedCmds()
|
|
GetWatching() map[string]uint32
|
|
|
|
// used for multi database
|
|
GetDBIndex() int
|
|
SelectDB(int)
|
|
}
|