Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CommandNames = map[Command]string{ ShutdownCommand: "Shutdown", IterateCommand: "Iterate", IterateKeysCommand: "IterateKeys", ClearCommand: "Clear", GetCommand: "Get", SetCommand: "Set", HasCommand: "Has", DeleteCommand: "Delete", DeletePrefixCommand: "DeletePrefix", }
CommandNames contains a map from the command to its human-readable name.
Functions ¶
func New ¶
New creates a new KVStore with debug callbacks. This can for example be used for debugging and to examine what the KVStore is doing. store is the underlying store to which all methods will be forwarded. callback will be called for all requests to the KVStore. commandsFilter optional filter to only report certain requests to the callback.
Types ¶
type AccessCallback ¶
AccessCallback is the type of the callback function that can be used to hook the access to the callback.
type Command ¶
Command is a type that represents a specific method in the KVStore.
const ( // IterateCommand represents a call to the Iterate method of the store. IterateCommand Command = 1 << iota // IterateKeysCommand represents a call to the IterateKeys method of the store. IterateKeysCommand // ClearCommand represents a call to the Clear method of the store. ClearCommand // GetCommand represents a call to the Get method of the store. GetCommand // SetCommand represents a call to the Set method of the store. SetCommand // HasCommand represents a call to the Has method of the store. HasCommand // DeleteCommand represents a call to the Delete method of the store. DeleteCommand // DeletePrefixCommand represents a call to the DeletePrefix method of the store. DeletePrefixCommand // AllCommands represents the collection of all commands. AllCommands = IterateCommand | IterateKeysCommand | ClearCommand | GetCommand | SetCommand | HasCommand | DeleteCommand | DeletePrefixCommand // ShutdownCommand represents a call to the Shutdown method of the store. ShutdownCommand Command = 0 )
Click to show internal directories.
Click to hide internal directories.