etcd

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Endpoints []string `yaml:"endpoints" json:"endpoints"` // required
}

Config is used to configure/create an ETCD-cluster client, and use it as the database backend for the metastor client.

type DB

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

DB defines a metastor database, in the form of a ETCD (cluster) client, as to store and load processed metadata to/from an ETCD cluster.

func New

func New(endpoints []string) (*DB, error)

New creates new metastor database client, using an ETCD cluster as storage medium.

func (*DB) Close

func (db *DB) Close() error

Close implements db.Close

func (*DB) Delete

func (db *DB) Delete(namespace, key []byte) error

Delete implements db.Delete

func (*DB) Get

func (db *DB) Get(namespace, key []byte) ([]byte, error)

Get implements db.Get

func (*DB) ListKeys

func (db *DB) ListKeys(namespace []byte, cb dbp.ListCallback) error

ListKeys implements db.ListKeys

func (*DB) Set

func (db *DB) Set(namespace, key, metadata []byte) error

Set implements db.Set

func (*DB) Update

func (db *DB) Update(namespace, key []byte, cb dbp.UpdateCallback) error

Update implements db.Update

Jump to

Keyboard shortcuts

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