Documentation
¶
Index ¶
Constants ¶
View Source
const ( NullOperation = iota Set Delete )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller interface {
chassis.ConsensusRegistrar
raft.FSM
KeyValue
}
func NewController ¶
func NewController(model Model) Controller
type Key ¶
type Key = string
Key is an alias to a string that identifies it's use as a key in the key/value store
type Model ¶
type Model interface {
dbadger.Repository
// Delete removes a key forever
Delete(Key, T) error
// Retrieve a value by it's key
Get(Key, T) (T, error)
// List takes in a key prefix, and returns a map
// of all values that the key prefix matches
List(T) (map[Key]T, error)
// Save a key, value to badger. If a key is the same as an existing
// key that has already been saved then the new value will overwrite the old.
Set(Key, T) error
}
type Rpc ¶
type Rpc interface {
chassis.RPCRegistrar
kvConnect.KeyValueServiceHandler
}
type SetResponse ¶
type SetResponse struct {
Error error
Data interface{}
}
Click to show internal directories.
Click to hide internal directories.