database

package
v0.0.0-...-dde17ac Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2018 License: GPL-3.0 Imports: 5 Imported by: 5

Documentation

Overview

Package database provides several constructs including a simple in-memory database. This should not be used for production, but would be a helpful interim solution for development.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ShardDB

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

ShardDB defines a service for the sharding system's persistent storage.

func NewShardDB

func NewShardDB(config *ShardDBConfig) (*ShardDB, error)

NewShardDB initializes a shardDB.

func (*ShardDB) DB

func (s *ShardDB) DB() essdb.Database

DB returns the attached essdb instance.

func (*ShardDB) Start

func (s *ShardDB) Start()

Start the shard DB service.

func (*ShardDB) Stop

func (s *ShardDB) Stop() error

Stop the shard DB service gracefully.

type ShardDBConfig

type ShardDBConfig struct {
	DataDir  string
	Name     string
	InMemory bool
}

ShardDBConfig specifies configuration options for the db service.

Jump to

Keyboard shortcuts

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