internal

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ModuleRegistry = map[reflect.Type]*ModuleInitializer{}

ModuleRegistry is the registry of module initializers indexed by their golang type to avoid any issues with protobuf descriptor initialization.

Functions

func GetModuleDescriptor

func GetModuleDescriptor(desc protoreflect.Descriptor) (*v1alpha1.ModuleDescriptor, error)

GetModuleDescriptor returns the cosmos.app.v1alpha1.ModuleDescriptor or nil if one isn't found. Errors are returned in unexpected cases.

func ModulesByModuleTypeName

func ModulesByModuleTypeName() (map[string]*ModuleInitializer, error)

ModulesByModuleTypeName should be used to retrieve modules by their module type name. This is done lazily after module registration to deal with non-deterministic issues that can occur with respect to protobuf descriptor initialization.

Types

type ModuleInitializer

type ModuleInitializer struct {
	ConfigGoType       reflect.Type
	ConfigProtoMessage gogoproto.Message
	Error              error
	Providers          []interface{}
	Invokers           []interface{}
}

ModuleInitializer describes how to initialize a module.

Directories

Path Synopsis
Code generated by protoc-gen-go-pulsar.
Code generated by protoc-gen-go-pulsar.

Jump to

Keyboard shortcuts

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