storage

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage interface {
	Lock() error
	Unlock() error

	Get(key string) (*string, error)
	GetPrefix(prefix string) (map[string]string, error)
	GetRaw(key string) (*mvccpb.KeyValue, error)
	GetRawPrefix(prefix string) (map[string]*mvccpb.KeyValue, error)

	Put(key, value string) error
	PutUnderLease(key, value string) error
	PutAndDelete(map[string]*string) error
	PutAndDeleteUnderLease(map[string]*string) error

	Delete(key string) error
	DeletePrefix(prefix string) error

	Syncer() (cluster.Syncer, error)
}

Storage is the interface to contain storage APIs.

func New

func New(name string, cls cluster.Cluster) Storage

New creates a storage.

Jump to

Keyboard shortcuts

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