You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
package entry
|
|
|
|
|
|
|
|
import "fmt"
|
|
|
|
|
|
|
|
type Entry struct {
|
|
|
|
Id uint64
|
|
|
|
IsBase bool // whether the command is decoded from dump.rdb file
|
|
|
|
DbId int
|
|
|
|
Argv []string
|
|
|
|
TimestampMs uint64
|
|
|
|
|
|
|
|
CmdName string
|
|
|
|
Group string
|
|
|
|
Keys []string
|
|
|
|
Slots []int
|
|
|
|
|
|
|
|
// for statistics
|
|
|
|
Offset int64
|
|
|
|
EncodedSize uint64 // the size of the entry after encode
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewEntry() *Entry {
|
|
|
|
e := new(Entry)
|
|
|
|
return e
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e *Entry) ToString() string {
|
|
|
|
return fmt.Sprintf("%v", e.Argv)
|
|
|
|
}
|