registrar

package
v3.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: CC0-1.0 Imports: 10 Imported by: 4 modules, 3 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetModules

func GetModules(mods modules.Modules, names []string, logger logging.Logger) []modules.Module

GetModules returns the list of module implementations based on the given module names. For each module name that is specified but not found, a warning log is printed.

Types

type Context

type Context struct {
	JunoConfig     config.Config
	SDKConfig      *sdk.Config
	EncodingConfig *params.EncodingConfig
	Database       database.Database
	Proxy          node.Node
	Logger         logging.Logger
}

Context represents the context of the modules registrar

func NewContext

func NewContext(
	parsingConfig config.Config, sdkConfig *sdk.Config, encodingConfig *params.EncodingConfig,
	database database.Database, proxy node.Node, logger logging.Logger,
) Context

NewContext allows to build a new Context instance

type DefaultRegistrar

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

DefaultRegistrar represents a registrar that allows to handle the default Juno modules

func NewDefaultRegistrar

func NewDefaultRegistrar(parser messages.MessageAddressesParser) *DefaultRegistrar

NewDefaultRegistrar builds a new DefaultRegistrar

func (*DefaultRegistrar) BuildModules

func (r *DefaultRegistrar) BuildModules(ctx Context) modules.Modules

BuildModules implements Registrar

type EmptyRegistrar

type EmptyRegistrar struct{}

EmptyRegistrar represents a Registrar which does not register any custom module

func (*EmptyRegistrar) BuildModules

func (*EmptyRegistrar) BuildModules(_ Context) modules.Modules

BuildModules implements Registrar

type Registrar

type Registrar interface {
	BuildModules(context Context) modules.Modules
}

Registrar represents a modules registrar. This allows to build a list of modules that can later be used by specifying their names inside the TOML configuration file.

Jump to

Keyboard shortcuts

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