appmodule

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2022 License: Apache-2.0 Imports: 4 Imported by: 514

Documentation

Overview

Package appmodule defines the functionality for registering Cosmos SDK app modules that are assembled using the github.com/cosmos/cosmos-sdk/container dependency injection system and the declarative app configuration format handled by the appconfig package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(msg proto.Message, options ...Option)

Register registers a module with the global module registry. The provided protobuf message is used only to uniquely identify the protobuf module config type. The instance of the protobuf message used in the actual configuration will be injected into the container and can be requested by a provider function. All module initialization should be handled by the provided options.

Protobuf message types used for module configuration should define the cosmos.app.v1alpha.module option and must explicitly specify go_package to make debugging easier for users.

Types

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option is a functional option for implementing modules.

func Provide

func Provide(providers ...interface{}) Option

Provide registers providers with the dependency injection system that will be run within the module scope. See github.com/cosmos/cosmos-sdk/container for documentation on the dependency injection system.

Jump to

Keyboard shortcuts

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