db

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2018 License: Apache-2.0 Imports: 0 Imported by: 0

README

The Data Broker (DB) abstraction

The CN-Infra Data Broker abstraction (see the diagram below) is based on two APIs:

  • The Broker API - used by app plugins to PULL (i.e. retrieve) data from a data store or PUSH (i.e. write) data into the data store. Data can be retrieved for a specific key or by running a query. Data can be written for a specific key. Multiple writes can be executed in a transaction.
  • The Watcher API - used by app plugins to WATCH data on a specified key. Watching means to monitor for data changes and be notified as soon as a change occurs.

db

The Broker & Watcher APIs abstract common database operations implemented by different databases (ETCD, Redis, Cassandra). Still, there are major differences between keyval-based & sql-based databases. Therefore the Broker & Watcher Go interfaces are defined in each package separately; while the method names for a given operation are the same, the method arguments are different.

Documentation

Overview

Package db is the parent package for the Data Broker client implementations for various key-value and SQL data stores.

Directories

Path Synopsis
Package cryptodata provides support for wrapping key-value store with crypto layer that will automatically decrypt all data passing through.
Package cryptodata provides support for wrapping key-value store with crypto layer that will automatically decrypt all data passing through.
Package keyval provides an abstraction of a key-value data store and defines the keyval data broker API.
Package keyval provides an abstraction of a key-value data store and defines the keyval data broker API.
etcd
Package etcd implements the key-value Data Broker client API for the etcd key-value data store.
Package etcd implements the key-value Data Broker client API for the etcd key-value data store.
etcd/mocks
Package mocks implements an embedded etcd mock used in unit & integration tests.
Package mocks implements an embedded etcd mock used in unit & integration tests.
kvproto
Package kvproto provides a wrapper that simplifies the storing and retrieving of proto-modelled data into/from a key-value data store.
Package kvproto provides a wrapper that simplifies the storing and retrieving of proto-modelled data into/from a key-value data store.
redis
Package redis is the implementation of the key-value Data Broker client API for the Redis key-value data store.
Package redis is the implementation of the key-value Data Broker client API for the Redis key-value data store.
sql
Package sql provides an abstraction of a data store that supports an SQL-like query language and defines the SQL data broker API.
Package sql provides an abstraction of a data store that supports an SQL-like query language and defines the SQL data broker API.
cassandra
Package cassandra is the implementation of the SQL Data Broker client API for the Cassandra data store.
Package cassandra is the implementation of the SQL Data Broker client API for the Cassandra data store.

Jump to

Keyboard shortcuts

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