local

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const LOCAL = "local"

Variables

This section is empty.

Functions

func New

func New(addrs []string, options *store.Config) (store.Store, error)

New creates a local store

func Register

func Register()

Register registers local to libkv

Types

type Local

type Local struct {
	// Endpoints passed to InitializeMock
	Endpoints []string

	// Options passed to InitializeMock
	Options *store.Config
}

Local "libkv" store.

func (*Local) AtomicDelete

func (l *Local) AtomicDelete(key string, previous *store.KVPair) (bool, error)

AtomicDelete is not implemented

func (*Local) AtomicPut

func (l *Local) AtomicPut(key string, value []byte, previous *store.KVPair, opts *store.WriteOptions) (bool, *store.KVPair, error)

AtomicPut is not implemented

func (*Local) Close

func (l *Local) Close()

Close is not required but needs to be implemented

func (*Local) Delete

func (l *Local) Delete(key string) error

Delete file

func (*Local) DeleteTree

func (l *Local) DeleteTree(prefix string) error

DeleteTree remove

func (*Local) Exists

func (l *Local) Exists(key string) (bool, error)

Exists file

func (*Local) Get

func (l *Local) Get(key string) (*store.KVPair, error)

Get file content

func (*Local) List

func (l *Local) List(prefix string) ([]*store.KVPair, error)

List files

func (*Local) NewLock

func (l *Local) NewLock(key string, options *store.LockOptions) (store.Locker, error)

NewLock is not implemented

func (*Local) Put

func (l *Local) Put(key string, value []byte, opts *store.WriteOptions) error

Put value to file

func (*Local) Watch

func (l *Local) Watch(key string, stopCh <-chan struct{}) (<-chan *store.KVPair, error)

Watch is not implemented

func (*Local) WatchTree

func (l *Local) WatchTree(prefix string, stopCh <-chan struct{}) (<-chan []*store.KVPair, error)

WatchTree is not implemented

Jump to

Keyboard shortcuts

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