store

package
v0.0.0-...-177e522 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: GPL-3.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 Consul

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

func NewConsul

func NewConsul(host string, token string, consistent bool) (*Consul, error)

func (*Consul) Delete

func (c *Consul) Delete(key string) error

func (*Consul) DeleteTree

func (c *Consul) DeleteTree(prefix string) error

func (*Consul) List

func (c *Consul) List(prefix string) (KVPairs, error)

func (*Consul) Put

func (c *Consul) Put(p *KVPair) error

type Entry

type Entry struct {
	Key   string
	Value []byte
}

func (Entry) Less

func (e Entry) Less(than btree.Item) bool

type KV

type KV interface {
	// func (k *KV) List(prefix string, q *QueryOptions) (KVPairs, *QueryMeta, error)
	List(prefix string) (KVPairs, error)
	// func (k *KV) Put(p *KVPair, q *WriteOptions) (*WriteMeta, error)
	Put(p *KVPair) error
	// func (k *KV) Delete(key string, w *WriteOptions) (*WriteMeta, error)
	Delete(key string) error
	// func (k *KV) DeleteTree(prefix string, w *WriteOptions) (*WriteMeta, error)
	DeleteTree(prefix string) error
}

type KVPair

type KVPair struct {
	Key   string
	Value []byte
}

type KVPairs

type KVPairs []KVPair

type Mem

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

func NewMem

func NewMem() *Mem

func (*Mem) Delete

func (m *Mem) Delete(key string) error

func (*Mem) DeleteTree

func (m *Mem) DeleteTree(prefix string) error

func (*Mem) List

func (m *Mem) List(prefix string) (KVPairs, error)

func (*Mem) Put

func (m *Mem) Put(p *KVPair) error

Jump to

Keyboard shortcuts

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