inmem

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package inmem, as the name implies, is an in-memory persistence layer with methods that are safe for concurrency. This is useful when simply wanting to work with something like a go map that is not safe for concurrency.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Persister

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

func (*Persister) Get

func (p *Persister) Get(key string) string

Get retrieves the value associated with the given key from the key-value store safe for concurrency.

func (*Persister) Set

func (p *Persister) Set(key, value string)

Set stores a key-value pair in the key-value store safe for concurrency.

func (*Persister) Setup

func (p *Persister) Setup() error

Setup creates the key-value map store safe for concurrency.

Jump to

Keyboard shortcuts

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