multinodedb

package
v1.39.1-rc Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2021 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNodesDB = errs.Class("NodesDB")

ErrNodesDB indicates about internal NodesDB error.

View Source
var (

	// Error is the default multinodedb errs class.
	Error = errs.Class("multinodedb")
)

Functions

This section is empty.

Types

type DB added in v1.31.1

type DB struct {
	*dbx.DB
	// contains filtered or unexported fields
}

DB combines access to different database tables with a record of the db driver, db implementation, and db source URL. Implementation of multinode.DB interface.

architecture: Master Database

func Open

func Open(ctx context.Context, log *zap.Logger, databaseURL string) (*DB, error)

Open creates instance of database supports postgres.

func (DB) MigrateToLatest added in v1.31.1

func (db DB) MigrateToLatest(ctx context.Context) error

MigrateToLatest migrates db to the latest version.

func (*DB) Nodes added in v1.31.1

func (db *DB) Nodes() nodes.DB

Nodes returns nodes database.

func (*DB) PostgresMigration added in v1.31.1

func (db *DB) PostgresMigration() *migrate.Migration

PostgresMigration returns steps needed for migrating postgres database.

func (*DB) SQLite3Migration added in v1.31.1

func (db *DB) SQLite3Migration() *migrate.Migration

SQLite3Migration returns steps needed for migrating sqlite3 database.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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