Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseInput ¶
ParseInput fills out a input struct from an http request. Returns ok if it succeeded; otherwise the string contains an error message.
func ValidateKey ¶
ValidateKey catches invalid keys and returns an invalid request. If the key is valid, the handler passes through.
Types ¶
type GossipResponse ¶
type GossipResponse struct {
Imported bool `json:"imported"`
}
type IncrementInput ¶
type IncrementInput struct {
Origin string `json:"origin"`
}
type Input ¶
type Input struct { Entry `json:",inline"` // A View and StorageState is only used for view change requests. View `json:",inline"` StorageState []store.Entry `json:"state"` // Context the request thinks is current CausalCtx clock.VectorClock `json:"causal-context"` }
Input stores arguments to each api request
type Response ¶
type Response struct { // The status code is not marshalled to JSON. The wrapper function uses this // to write the HTTP response body. Defaults to 200. Status int `json:"-"` // Standard information for key value storing Message string `json:"message,omitempty"` Value string `json:"value,omitempty"` Error string `json:"error,omitempty"` Exists *bool `json:"doesExist,omitempty"` Replaced *bool `json:"replaced,omitempty"` // Info about the state of shards Shards interface{} `json:"shards,omitempty"` KeyCount *int `json:"key-count,omitempty"` ShardId *int `json:"shard-id,omitempty"` Replicas []string `json:"replicas,omitempty"` // Potential forwarding metadata Address string `json:"address,omitempty"` // Context for causal consistency CausalCtx clock.VectorClock `json:"causal-context"` // Internal view change data StorageState []store.Entry `json:"state,omitempty"` }
Click to show internal directories.
Click to hide internal directories.