db

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2017 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 data changes on and be notified as soon as the 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 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.
etcdv3
Package etcdv3 implements the key-value Data Broker client API for the etcdv3 key-value data store.
Package etcdv3 implements the key-value Data Broker client API for the etcdv3 key-value data store.
etcdv3/mocks
Package mocks implements an embedded etcdv3 mock used in unit & integration tests.
Package mocks implements an embedded etcdv3 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.
plugin
Package plugin contains a keyval plugin skeleton used in various key-value data store clients (e.g.
Package plugin contains a keyval plugin skeleton used in various key-value data store clients (e.g.
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