modules

package
v0.0.0-...-921adc7 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EagerInjectors = map[string]interface{}{}
View Source
var Injectors = map[string]interface{}{
	"bolt":                  InjectBolt,
	"ossiconesblockchain":   InjectOssiconesBlockchain,
	"defaultexplorerserver": InjectDefaultExplorerServer,
	"defaultrestapiserver":  InjectDefaultRESTAPIServer,
}

Dependency Injection List

injectors stores module_name(key) with injector_func(value) using map. For wiring, name of implement using in config with injector function.

Examples :

var injectors = map[string]interface{}{
	"viperconfig": 			InjectViperConfig,
	"ossiconesblockchain":	InjectOssiconesBlockchain,
}

var eagerInjectors = map[string]interface{}{
	"defaultexplorerserver": InjectDefaultExplorerServer,
	"defaultrestapiserver":  InjectDefaultRESTAPIServer,
}

Functions

func InjectBolt

func InjectBolt(config viperjacket.Config) (database.Database, error)

InjectBolt injects dependencies and inits of Database.

func InjectDefaultExplorerServer

func InjectDefaultExplorerServer(
	config viperjacket.Config,
	blockchain blockchain.Blockchain,
) (explorerserver.ExplorerServer, error)

InjectDefaultExplorerServer injects dependencies and inits of ExplorerServer.

func InjectDefaultRESTAPIServer

func InjectDefaultRESTAPIServer(
	config viperjacket.Config,
	blockchain blockchain.Blockchain,
) (restapiserver.RESTAPIServer, error)

InjectDefaultRESTAPIServer injects dependencies and inits of APiServer.

func InjectOssiconesBlockchain

func InjectOssiconesBlockchain(config viperjacket.Config, db database.Database) (blockchain.Blockchain, error)

InjectOssiconesBlockchain injects dependencies and inits of Blockchain.

Types

This section is empty.

Jump to

Keyboard shortcuts

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