kv

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: Apache-2.0 Imports: 4 Imported by: 3

Documentation

Overview

Package kv provides access to key value stores within Spin components.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store is the Key/Value backend storage.

func OpenStore

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

OpenStore creates a new instance of Store and opens a connection.

func (*Store) Close

func (s *Store) Close()

Close terminates the connection to Store.

func (*Store) Delete

func (s *Store) Delete(key string) error

Delete removes a value from Store.

func (*Store) Exists

func (s *Store) Exists(key string) (bool, error)

Exists checks if a key exists within Store.

func (*Store) Get

func (s *Store) Get(key string) ([]byte, error)

Get retrieves a value from Store.

func (*Store) Set

func (s *Store) Set(key string, value []byte) error

Set creates a new key/value in Store.

Jump to

Keyboard shortcuts

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