Documentation
¶
Index ¶
- Constants
- func BuildProcessTags(process hySchema.Process, nodeAddr string, tags []goarSchema.Tag) (hySchema.Process, error)
- func CheckModuleFormat(moduleFormat string, tags []goarSchema.Tag) error
- func CompressDirectory(srcPath string) (string, error)
- func ContainerEnvFromTags(tags []goarSchema.Tag) []string
- func DecompressToDirectory(data string, destPath string) error
- func RuntimeSpecFromModuleAndSpawnTags(moduleFormat string, moduleTags, spawnTags []goarSchema.Tag) (schema.RuntimeSpec, error)
- func RuntimeSpecFromTags(moduleFormat string, tags []goarSchema.Tag) (schema.RuntimeSpec, error)
Constants ¶
const ContainerEnvTagPrefix = "Container-Env-"
ContainerEnvTagPrefix defines the tag naming convention for passing container environment variables.
Format:
- Tag Name: "Container-Env-" + <ENV_KEY>
- Tag Value: <ENV_VALUE>
Example:
- Container-Env-RUNTIME_TYPE = openclaw
- Container-Env-OPENCLAW_GATEWAY_URL = http://127.0.0.1:18789
- Container-Env-OPENCLAW_GATEWAY_TOKEN = openclaw-test-token
Parsing rule:
- For each tag with Name prefix "Container-Env-", ENV_KEY = strings.TrimPrefix(Name, prefix)
- Emit env entry as ENV_KEY + "=" + Value
Variables ¶
This section is empty.
Functions ¶
func BuildProcessTags ¶
func BuildProcessTags(process hySchema.Process, nodeAddr string, tags []goarSchema.Tag) (hySchema.Process, error)
todo: this function for test env, should remove when real data is ok
func CheckModuleFormat ¶
func CheckModuleFormat(moduleFormat string, tags []goarSchema.Tag) error
CheckModuleFormat validates the module configuration for the selected runtime backend.
func CompressDirectory ¶
CompressDirectory compresses the specified directory into a tar.gz format string. It preserves the directory structure and file permissions. srcPath: the absolute path of the directory to be compressed Returns the compressed data as a string and any error encountered
func ContainerEnvFromTags ¶ added in v0.0.3
func ContainerEnvFromTags(tags []goarSchema.Tag) []string
ContainerEnvFromTags extracts container environment variables from tags using ContainerEnvTagPrefix.
It returns a deterministic (sorted) env list in the form "KEY=VALUE". If the same KEY appears multiple times, the last occurrence wins.
func DecompressToDirectory ¶
DecompressToDirectory extracts a tar.gz format string to the specified directory. It recreates the original directory structure and preserves file permissions. data: the compressed data string destPath: the absolute path where the data should be extracted to Returns any error encountered during the extraction process
func RuntimeSpecFromModuleAndSpawnTags ¶ added in v0.0.3
func RuntimeSpecFromModuleAndSpawnTags(moduleFormat string, moduleTags, spawnTags []goarSchema.Tag) (schema.RuntimeSpec, error)
func RuntimeSpecFromTags ¶ added in v0.0.3
func RuntimeSpecFromTags(moduleFormat string, tags []goarSchema.Tag) (schema.RuntimeSpec, error)
Types ¶
This section is empty.