kv

package
v0.0.0-...-ea26007 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2025 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package kv contains "key-value" stores used for testing

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UnsafeMapKv

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

UnsafeMapKv is an unsafe key-value store implementation using a map for testing

func NewUnsafe

func NewUnsafe() *UnsafeMapKv

NewUnsafe creates a new UnsafeMapKv

func (*UnsafeMapKv) Close

func (m *UnsafeMapKv) Close() error

Close the store (no-op)

func (*UnsafeMapKv) Delete

func (m *UnsafeMapKv) Delete(key string) (bool, error)

Delete the value at key

func (*UnsafeMapKv) Get

func (m *UnsafeMapKv) Get(key string) (string, error)

Get the value at key

func (*UnsafeMapKv) Set

func (m *UnsafeMapKv) Set(key string, value string, ttl int, upsert bool) (bool, error)

Set the key to value, updating possible existing if upsert is true NOTE ttl is ignored for this implementation

Jump to

Keyboard shortcuts

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