module

package
v0.14.7 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2022 License: MPL-2.0 Imports: 5 Imported by: 3 modules, 2 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

This section is empty.

Types

type InfoReader

type InfoReader func(logger hclog.Logger, module string, prefferedVersions []uint32) (res InfoResult, err error)

InfoReader is called when the user executes a module, to get provider supported metadata about the given module

func EmbeddedReader

func EmbeddedReader(moduleData embed.FS, basedir string) InfoReader

EmbeddedReader returns an InfoReader handler given a "moduleData" filesystem. The fs should have all the required files for the modules in basedir, as one subdirectory per module ID. Each subdirectory (for the module ID) should contain one subdirectory per protocol version. Each protocol-version subdirectory can contain multiple files. Example: moduledata/drift/1/file.hcl (where "drift" is the module name and "1" is the protocol version)

type InfoResult

type InfoResult struct {
	// Data contains all cqproto.ModuleInfo incarnations in the requested/preferred versions (if any)
	Data map[uint32]cqproto.ModuleInfo
	// AvailableVersions is the all available versions supported by the provider (if any)
	AvailableVersions []uint32
}

InfoResult is what the provider returns from an InfoReader request.

Jump to

Keyboard shortcuts

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