kvstore

package
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 30, 2023 License: Apache-2.0, BSD-3-Clause Imports: 3 Imported by: 0

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 ErrKeyNotFound = errors.New("kvstore: key not found")

Functions

This section is empty.

Types

type Entry

type Entry struct {
	io.Reader
	// contains filtered or unexported fields
}

func (*Entry) String

func (e *Entry) String() string

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store represents a Fastly kv store

func Open

func Open(name string) (*Store, error)

Open returns a handle to the named kv store

func (*Store) Insert

func (s *Store) Insert(key string, value io.Reader) error

Insert adds a key to the associated kv store.

func (*Store) Lookup

func (s *Store) Lookup(key string) (*Entry, error)

Lookup fetches a key from the associated kv store. If the key does not exist, Lookup returns the sentinel error ErrKeyNotFound.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL