database

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database interface {
	Start()
}

Database represents a database

type Factory

Factory is a function that returns a new instance of database

type Registrar

type Registrar struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Registrar represents database factory registration.

func NewRegistrar

func NewRegistrar(lg *zap.Logger) *Registrar

NewRegistrar creates new registrar.

func (*Registrar) GetDatabaseFactory

func (r *Registrar) GetDatabaseFactory(name string) (Factory, bool)

GetDatabaseFactory returns requested database factory.

func (*Registrar) Register

func (r *Registrar) Register(name, vendor string, df Factory)

Register adds new database factory.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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