wheat-cache/structure/interface.go

23 lines
410 B
Go
Raw Normal View History

package structure
2021-08-29 22:18:07 +08:00
type CacheValue interface {
LengthByte() int64
}
type ParseComm func(comm string) ([]string, error)
type CacheStruct interface {
SizeByte() int64
// TODO RollBack 事务相关, V2 实现
2021-08-29 22:18:07 +08:00
RollBack() error
// Begin 事务相关, V2 实现
2021-08-29 22:18:07 +08:00
Begin() error
// Comment 事务相关, V2 实现
2021-08-29 22:18:07 +08:00
Comment() error
ParseCommend(comm ParseComm) ([]string, error)
Encode() ([]byte, error)
}