Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
Config holds all configuration for the provider.
func (*Config) LoadConfig ¶
LoadConfig loads and validates the KV provider config.
type Cookie ¶
type Cookie struct {
Cookie uint64 `json:"cookie"`
}
Cookie holds a unique value that is used as a reference to server side storage.
type DeleteArgs ¶
DeleteArgs specify the arguments to the "kv-delete" endpoint.
type EphemeralDestroyArgs ¶
type EphemeralDestroyArgs struct {
Key string `json:"key"`
}
EphemeralDestroyArgs specifies the arguments to the "kv-ephemeral-destroy" endpoint.
type EphemeralSetArgs ¶
type EphemeralSetArgs struct { Key string `json:"key"` Value string `json:"value"` TTL time.Duration `json:"ttl"` }
EphemeralSetArgs specifies the arguments to the "kv-ephemeral-set" endpoint.
type GetArgs ¶
type GetArgs struct {
Key string `json:"key"`
}
GetArgs specify the arguments to the "kv-get" endpoint.
type KV ¶
type KV struct {
// contains filtered or unexported fields
}
KV is a provider of kv functionality.
func (*KV) RegisterTasks ¶
RegisterTasks registers all of KV's task handlers with the server.
type Mock ¶
type Mock struct { *KV // contains filtered or unexported fields }
Mock is a mock KV provider
func NewMock ¶
NewMock starts up a kv backend server and instantiates a new kv.KV provider. The kv backend is started on the port provided as part of config.Address(). Mock.Stop() should be called when testing is done in order to clean up.
type RemoveArgs ¶
RemoveArgs specifies the arguments to the "kv-remove" endpoint.
type UpdateArgs ¶
type UpdateArgs struct { Key string `json:"key"` Value string `json:"value"` Index uint64 `json:"index"` }
UpdateArgs specifies the arguments to the "kv-update" endpoint.
type UpdateReturn ¶
type UpdateReturn struct {
Index uint64 `json:"index"`
}
UpdateReturn specifies the return value from the "kv-update" endpoint.