github.com/hdt3213/godis@v1.2.9/interface/redis/conn.go (about) 1 package redis 2 3 // Connection represents a connection with redis client 4 type Connection interface { 5 Write([]byte) (int, error) 6 Close() error 7 8 SetPassword(string) 9 GetPassword() string 10 11 // client should keep its subscribing channels 12 Subscribe(channel string) 13 UnSubscribe(channel string) 14 SubsCount() int 15 GetChannels() []string 16 17 InMultiState() bool 18 SetMultiState(bool) 19 GetQueuedCmdLine() [][][]byte 20 EnqueueCmd([][]byte) 21 ClearQueuedCmds() 22 GetWatching() map[string]uint32 23 AddTxError(err error) 24 GetTxErrors() []error 25 26 GetDBIndex() int 27 SelectDB(int) 28 29 SetSlave() 30 IsSlave() bool 31 32 SetMaster() 33 IsMaster() bool 34 35 Name() string 36 }