backends

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: May 2, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultBackends

func GetDefaultBackends(backend string) []string

Types

type Config

type Config struct {
	Backend      string
	Prefix       string
	Group        string
	BasicAuth    bool
	ClientCaKeys string
	ClientCert   string
	ClientKey    string
	BackendNodes []string
	Password     string
	Username     string
}

type StoreClient

type StoreClient interface {
	Get(nodePath string, dir bool) (interface{}, error)
	Put(nodePath string, value interface{}, replace bool) error
	// Delete
	// if the 'key' represent a dir, 'dir' should be true.
	Delete(nodePath string, dir bool) error
	Sync(store store.Store, stopChan chan bool)

	GetMapping(nodePath string, dir bool) (interface{}, error)
	PutMapping(nodePath string, mapping interface{}, replace bool) error
	DeleteMapping(nodePath string, dir bool) error
	SyncMapping(mapping store.Store, stopChan chan bool)
}

The StoreClient interface is implemented by objects that can retrieve key/value pairs from a backend store.

func New

func New(config Config) (StoreClient, error)

New is used to create a storage client based on our configuration.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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