Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrNamespace = errorx.NewNamespace("config") NotFoundError = ErrNamespace.NewType("not_found", errorx.NotFound()) )
Functions ¶
func Initialize ¶
Initialize loads the configuration from the specified file.
Parameters:
- path: The path to the configuration file.
Returns:
- An error if the configuration cannot be loaded.
func OverrideBlockNodeConfig ¶ added in v0.6.0
func OverrideBlockNodeConfig(overrides BlockNodeConfig)
OverrideBlockNodeConfig updates the block node configuration with provided overrides. Empty string values are ignored (not applied).
Types ¶
type BlockNodeConfig ¶
type BlockNodeConfig struct {
Namespace string `yaml:"namespace" json:"namespace"`
Release string `yaml:"release" json:"release"`
Chart string `yaml:"chart" json:"chart"`
Version string `yaml:"version" json:"version"`
Storage BlockNodeStorage `yaml:"storage" json:"storage"`
}
BlockNodeConfig represents the `blockNode` configuration block.
func (*BlockNodeConfig) Validate ¶ added in v0.6.0
func (c *BlockNodeConfig) Validate() error
Validate validates all block node configuration fields to ensure they are safe and secure. This performs early validation of user-provided configuration to catch security issues before workflow execution begins.
type BlockNodeStorage ¶
type BlockNodeStorage struct {
BasePath string `yaml:"basePath" json:"basePath"`
ArchivePath string `yaml:"archivePath" json:"archivePath"`
LivePath string `yaml:"livePath" json:"livePath"`
LogPath string `yaml:"logPath" json:"logPath"`
LiveSize string `yaml:"liveSize" json:"liveSize"`
ArchiveSize string `yaml:"archiveSize" json:"archiveSize"`
LogSize string `yaml:"logSize" json:"logSize"`
}
BlockNodeStorage represents the `storage` section under `blockNode`.
func (*BlockNodeStorage) Validate ¶ added in v0.6.0
func (s *BlockNodeStorage) Validate() error
Validate validates all storage paths to ensure they are safe and secure. This performs early validation of user-provided paths to catch security issues before workflow execution begins.
type Config ¶
type Config struct {
Log logx.LoggingConfig `yaml:"log" json:"log"`
BlockNode BlockNodeConfig `yaml:"blockNode" json:"blockNode"`
}
Config holds the global configuration for the application.