Write a SpecConfig
SpecConfig
provides a unified structure to specify configurations for various components in Bacalhau, including engines, publishers, and input sources. Its flexible design allows seamless integration with multiple systems like Docker, WebAssembly (Wasm), AWS S3, and local directories, among others.
SpecConfig
Parameters
SpecConfig
ParametersType
(string : <required>)
: Specifies the type of the configuration. Examples includedocker
andwasm
for execution engines,S3
for input sources and publishers, etc.Params
(map[string]any : <optional>)
: A set of key-value pairs that provide the specific configurations for the chosen type. The keys and values are flexible and depend on theType
. For instance, parameters for a Docker engine might include image name and version, while an S3 publisher would require configurations like the bucket name and AWS region. If not provided, it defaults tonil
.
Usage Examples
Here are a few hypothetical examples to demonstrate how you might define SpecConfig
for different components:
Docker Engine
Full Docker spec can be found here.
S3 Publisher
Full S3 Publisher can be found here.
Local Directory Input Source
Full local source can be found here.
Remember, the exact keys and values in the Params
map will vary depending on the specific requirements of the component being configured. Always refer to the individual component's documentation to understand the available parameters.