objdb

package
v0.0.0-...-9647dda Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	// Get a Key from conf store
	GetObj(key string, retValue interface{}) error
	GetRaw(key string) ([]byte, error)

	// Set a key in conf store
	SetObj(key string, value interface{}) error
	SetRaw(key string, value []byte) error

	// Remove an object
	DelObj(key string) error
}

func NewClient

func NewClient(endpoints []string, root string) (API, error)

Initialize the etcd client

type EtcdClient

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

EtcdClient has etcd client state

func (*EtcdClient) DelObj

func (ec *EtcdClient) DelObj(key string) error

DelObj Remove an object

func (*EtcdClient) GetObj

func (ec *EtcdClient) GetObj(key string, retVal interface{}) error

GetObj Get an object

func (*EtcdClient) GetRaw

func (ec *EtcdClient) GetRaw(key string) ([]byte, error)

func (*EtcdClient) SetObj

func (ec *EtcdClient) SetObj(key string, value interface{}) error

Recursive function to look thru each directory and get the files SetObj Save an object, create if it doesnt exist

func (*EtcdClient) SetRaw

func (ec *EtcdClient) SetRaw(key string, jsonVal []byte) error

Jump to

Keyboard shortcuts

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