store

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(name string, handler Generator)

Types

type Generator

type Generator func(map[string]interface{}) (Store, error) //

type StateItem

type StateItem struct {
	Key      string
	Value    []byte
	Etag     string
	Metadata map[string]string
}

StateItem represents a single state item.

type Store

type Store interface {
	// GetState retrieves state from specific store using default consistency option.
	Get(ctx context.Context, key string) (item *StateItem, err error)
	// SaveState saves the raw data into store using default state options.
	Set(ctx context.Context, key string, data []byte) error
	// Del delete record from store.
	Del(ctx context.Context, key string) error
}

func NewStore

func NewStore(metadata resource.Metadata) Store

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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