storage

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package storage implements banshee's persistence storage.

Structure

Storage handles 4 kinds of data: index, metric, event and admin, the directory structure is:

storage/
    |--index/               --- Metric index          LevelDB
    |--metric/              --- Metric data           LevelDB
    |--admin                --- Rules/Users/Projects  SQLite3
    |- event/               --- Event                 SQLite3

The storage directory will be created if not exists.

For each child database, see its package's documentation for more.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	// Child db
	Admin  *admindb.DB
	Index  *indexdb.DB
	Metric *metricdb.DB
	Event  *eventdb.DB
}

DB handles the storage on leveldb.

func Open

func Open(fileName string, opts *Options) (*DB, error)

Open a DB by fileName and options.

func (*DB) Close

func (db *DB) Close() error

Close a DB.

type Options

type Options struct {
	Period       uint32
	Expiration   uint32
	FilterOffset float64
}

Options is to open DB.

Directories

Path Synopsis
Package admindb handles the admin storage on SQLite3.
Package admindb handles the admin storage on SQLite3.
Package eventdb handles the events storage.
Package eventdb handles the events storage.
Package indexdb handles the indexes storage.
Package indexdb handles the indexes storage.
Package metricdb handles the metrics storage.
Package metricdb handles the metrics storage.

Jump to

Keyboard shortcuts

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