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.
Click to show internal directories.
Click to hide internal directories.