globalstore

package module
v0.0.0-...-e6d6583 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2022 License: Unlicense Imports: 7 Imported by: 0

README

globalstore

System-wide shared KV repository

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultGlobalStore = Open("default")

Functions

func CAS

func CAS(key string, oldValue []byte, newValue []byte) (bool, error)

func D

func D(key string) error

func G

func G(key string) ([]byte, error)

func Lock

func Lock() error

func S

func S(key string, value []byte) error

func Unlock

func Unlock() error

Types

type GlobalStore

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

func Open

func Open(id string) *GlobalStore

func (*GlobalStore) CompareAndSwap

func (gs *GlobalStore) CompareAndSwap(key string, oldValue []byte, newValue []byte) (bool, error)

func (*GlobalStore) Delete

func (gs *GlobalStore) Delete(key string) error

func (*GlobalStore) Get

func (gs *GlobalStore) Get(key string) ([]byte, error)

func (*GlobalStore) Lock

func (gs *GlobalStore) Lock() error

func (*GlobalStore) Set

func (gs *GlobalStore) Set(key string, value []byte) error

func (*GlobalStore) Unlock

func (gs *GlobalStore) Unlock() error

Jump to

Keyboard shortcuts

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