memo

package
v0.0.0-...-9e054ec Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package memo implements a simple kv store with string keys.

Index

Constants

This section is empty.

Variables

Set is used by Wire.

Functions

This section is empty.

Types

type Memo

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

Memo is a key store that persists a value associated to a key.

func ProvideMemo

func ProvideMemo(
	ctx context.Context, db *types.StagingPool, staging ident.StagingSchema,
) (*Memo, error)

ProvideMemo is called by Wire to construct the KV wrapper.

func (*Memo) Get

func (m *Memo) Get(ctx context.Context, tx types.StagingQuerier, key string) ([]byte, error)

Get retrieves a value given a key or nil if it does not exist.

func (*Memo) Put

func (m *Memo) Put(ctx context.Context, tx types.StagingQuerier, key string, value []byte) error

Put stores the key-value in the target database

Jump to

Keyboard shortcuts

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