kv

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package kv uses 'natty' under the covers; this pkg exists separate from the 'bus' package in order to simplify instantiation of the persistent config package. Persistent config only needs KV functionality and does not use any of the consumer parts of the 'bus'.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IKV

type IKV interface {
	Put(ctx context.Context, bucket, key string, value []byte) error
	Get(ctx context.Context, bucket, key string) ([]byte, error)
	Delete(ctx context.Context, bucket, key string) error
}

type KV

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

func New

func New(serverOptions *opts.ServerOptions) (*KV, error)

func (*KV) Delete

func (k *KV) Delete(ctx context.Context, bucket, key string) error

func (*KV) Get

func (k *KV) Get(ctx context.Context, bucket, key string) ([]byte, error)

func (*KV) Put

func (k *KV) Put(ctx context.Context, bucket, key string, value []byte) error

Jump to

Keyboard shortcuts

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