Documentation
¶
Overview ¶
Package kvstore provides access to Fastly KV stores.
KV stores provide durable storage of key/value data that is readable and writable at the edge and synchronized globally.
See the Fastly KV store documentation for details.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrStoreNotFound indicates that the named store doesn't exist. ErrStoreNotFound = errors.New("kvstore: store not found") // ErrKeyNotFound indicates that the named key doesn't exist in this // KV store. ErrKeyNotFound = errors.New("kvstore: key not found") // ErrInvalidKey indicates that the given key is invalid. ErrInvalidKey = errors.New("kvstore: invalid key") // ErrTooManyRequests is returned when inserting a value exceeds the // rate limit. ErrTooManyRequests = errors.New("kvstore: too many requests") // ErrInvalidOptions indicates the options provided for this operation were invalid. ErrInvalidOptions = errors.New("kvstore: invalid options") // ErrBadRequest indicates the KV Store request was bad. ErrBadRequest = errors.New("kvstore: bad request") // ErrPreconditionFailed indicates a precondition for the kvstore operation failed. ErrPreconditionFailed = errors.New("kvstore: precondition failed") // ErrPayloadTooLarge indicates the item exceeded the payload limit. ErrPayloadTooLarge = errors.New("kvstore: payload too large") // ErrUnexpected indicates than an unexpected error occurred. ErrUnexpected = errors.New("kvstore: unexpected error") )
Functions ¶
This section is empty.
Types ¶
type Entry ¶
Entry represents a KV store value.
It embeds an io.Reader which holds the contents of the value, and can be passed to functions that accept an io.Reader.
For smaller values, an Entry.String method is provided to consume the contents of the underlying reader and return a string.
Do not mix-and-match these approaches: use either the io.Reader or the Entry.String method, not both.
func (*Entry) Generation ¶ added in v1.4.0
Click to show internal directories.
Click to hide internal directories.