module

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2022 License: MPL-2.0 Imports: 5 Imported by: 2

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