Documentation
¶
Overview ¶
Package command
Command describes a set of actions performed on a btree. Each command is isolated from other commands and can only affect one shard.
TODO: Remake commands to support work with multiple shards
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
Command interface describes how a command affects the low level storage. Each command should implement 3 methods: Execute(), Type() and Key()
- Execute should represent how certain Command will affect the storage, Read commands should return value of specified key and Write commands should return it's own value as result. Any error returned will be considered as fatal (for now). Interaction with storage is done via btree.Btree
- Type should return CommandType for a certain Command. If a Command is not writing any data - it is considered as read, otherwise - as write
- Key should return single string which represents what Command is querying. Embed pair struct to automatically embed Key() method