Documentation
¶
Index ¶
- type KeepConnection
- func (k *KeepConnection) AddTxError(err error)
- func (k *KeepConnection) CleanWatchKey()
- func (k *KeepConnection) Close() error
- func (k *KeepConnection) EnqueueCmd(redisCommand [][]byte)
- func (k *KeepConnection) GetChannels() []string
- func (k *KeepConnection) GetDBIndex() int
- func (k *KeepConnection) GetPassword() string
- func (k *KeepConnection) GetQueuedCmdLine() [][][]byte
- func (k *KeepConnection) GetTxErrors() []error
- func (k *KeepConnection) GetWatchKey() map[string]int64
- func (k *KeepConnection) IsClosed() bool
- func (k *KeepConnection) IsTransaction() bool
- func (k *KeepConnection) RemoteAddr() string
- func (k *KeepConnection) SetDBIndex(index int)
- func (k *KeepConnection) SetPassword(password string)
- func (k *KeepConnection) SetTransaction(val bool)
- func (k *KeepConnection) SubCount() int
- func (k *KeepConnection) Subscribe(channel string)
- func (k *KeepConnection) Unsubscribe(channel string)
- func (k *KeepConnection) Write(b []byte) (int, error)
- type VirtualConnection
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeepConnection ¶
type KeepConnection struct {
// contains filtered or unexported fields
}
记录连接的相关信息
func NewKeepConnection ¶
func NewKeepConnection(c net.Conn) *KeepConnection
本质就是构建 *KeepConnection对象,存储c net.Conn 以及相关信息
func (*KeepConnection) AddTxError ¶
func (k *KeepConnection) AddTxError(err error)
func (*KeepConnection) CleanWatchKey ¶
func (k *KeepConnection) CleanWatchKey()
func (*KeepConnection) EnqueueCmd ¶
func (k *KeepConnection) EnqueueCmd(redisCommand [][]byte)
func (*KeepConnection) GetChannels ¶
func (k *KeepConnection) GetChannels() []string
func (*KeepConnection) GetDBIndex ¶
func (k *KeepConnection) GetDBIndex() int
func (*KeepConnection) GetPassword ¶
func (k *KeepConnection) GetPassword() string
func (*KeepConnection) GetQueuedCmdLine ¶
func (k *KeepConnection) GetQueuedCmdLine() [][][]byte
func (*KeepConnection) GetTxErrors ¶
func (k *KeepConnection) GetTxErrors() []error
func (*KeepConnection) GetWatchKey ¶
func (k *KeepConnection) GetWatchKey() map[string]int64
func (*KeepConnection) IsClosed ¶
func (k *KeepConnection) IsClosed() bool
func (*KeepConnection) IsTransaction ¶
func (k *KeepConnection) IsTransaction() bool
func (*KeepConnection) SetTransaction ¶
func (k *KeepConnection) SetTransaction(val bool)
func (*KeepConnection) SubCount ¶
func (k *KeepConnection) SubCount() int
func (*KeepConnection) Subscribe ¶
func (k *KeepConnection) Subscribe(channel string)
func (*KeepConnection) Unsubscribe ¶
func (k *KeepConnection) Unsubscribe(channel string)
type VirtualConnection ¶
type VirtualConnection struct {
KeepConnection
// contains filtered or unexported fields
}
func NewVirtualConn ¶
func NewVirtualConn() *VirtualConnection
func (*VirtualConnection) GetDBIndex ¶
func (v *VirtualConnection) GetDBIndex() int
func (*VirtualConnection) GetPassword ¶
func (v *VirtualConnection) GetPassword() string
func (*VirtualConnection) SetDBIndex ¶
func (v *VirtualConnection) SetDBIndex(index int)
Click to show internal directories.
Click to hide internal directories.