Documentation
¶
Index ¶
- Constants
- func ConfigOption(engineJson string, compressed bool) func(*engineImpl) error
- func ConfigViaEnv(e *engineImpl)
- func DebugMode(debugMode bool, mockFile string, genMock bool, outputPath string, ...) func(*engineImpl) error
- func DirectRunner(e *engineImpl) error
- func EnvPropertyProcessor(properties map[string]any) error
- func GetAppName() string
- func GetAppPropertyValueResolvers(logger log.Logger) string
- func GetAppVersion() string
- func GetEnvName() string
- func GetQodeflowAppConfigPath() string
- func GetQodeflowEngineConfigPath() string
- func GetRunnerQueueSize() int
- func GetRunnerType() string
- func GetRunnerWorkers() int
- func IsSchemaSupportEnabled() bool
- func IsSchemaValidationEnabled() bool
- func LifeCycle(managedEntity managed.Managed)
- func LoadAppConfig(qodeflowJson string, compressed bool) (*app.Config, error)
- func NewPooledRunnerConfig() *runner.PooledConfig
- func RunEngine(e Engine) int
- func StopEngineOnError() bool
- type Config
- type Engine
- type Option
- type ServiceConfig
Constants ¶
View Source
const ( EnvKeyAppConfigLocation = "QODEFLOW_CONFIG_PATH" DefaultAppConfigLocation = "qodeflow.json" EnvKeyEngineConfigLocation = "QODEFLOW_ENG_CONFIG_PATH" DefaultEngineConfigLocation = "engine.json" EnvKeyStopEngineOnError = "QODEFLOW_ENGINE_STOP_ON_ERROR" DefaultStopEngineOnError = true EnvKeyRunnerType = "QODEFLOW_RUNNER_TYPE" DefaultRunnerType = ValueRunnerTypePooled EnvKeyRunnerWorkers = "QODEFLOW_RUNNER_WORKERS" DefaultRunnerWorkers = 5 //Deprecated EnvKeyRunnerQueueSizeLegacy = "QODEFLOW_RUNNER_QUEUE" EnvKeyRunnerQueueSize = "QODEFLOW_RUNNER_QUEUE_SIZE" DefaultRunnerQueueSize = 50 EnvAppPropertyResolvers = "QODEFLOW_APP_PROP_RESOLVERS" EnvEnableSchemaSupport = "QODEFLOW_SCHEMA_SUPPORT" EnvEnableSchemaValidation = "QODEFLOW_SCHEMA_VALIDATION" EnvKeyEnvName = "QODEFLOW_ENV" ValueRunnerTypePooled = "POOLED" ValueRunnerTypeDirect = "DIRECT" )
Variables ¶
This section is empty.
Functions ¶
func ConfigOption ¶
func ConfigViaEnv ¶
func ConfigViaEnv(e *engineImpl)
func DirectRunner ¶
func DirectRunner(e *engineImpl) error
func EnvPropertyProcessor ¶
func GetEnvName ¶
func GetEnvName() string
GetEnvName returns the name of the environment e.g. dev, test, prod
func GetQodeflowAppConfigPath ¶
func GetQodeflowAppConfigPath() string
GetQodeflowAppConfigPath returns the qodeflow config path
func GetQodeflowEngineConfigPath ¶
func GetQodeflowEngineConfigPath() string
GetQodeflowEngineConfigPath returns the qodeflow engine config path
func GetRunnerQueueSize ¶
func GetRunnerQueueSize() int
GetRunnerQueueSize returns the runner queue size
func GetRunnerWorkers ¶
func GetRunnerWorkers() int
GetRunnerWorkers returns the number of workers to use
func IsSchemaSupportEnabled ¶
func IsSchemaSupportEnabled() bool
func IsSchemaValidationEnabled ¶
func IsSchemaValidationEnabled() bool
func NewPooledRunnerConfig ¶
func NewPooledRunnerConfig() *runner.PooledConfig
NewPooledRunnerConfig creates a new Pooled config, looks for environment variables to override default values
func StopEngineOnError ¶
func StopEngineOnError() bool
Types ¶
type Config ¶
type Config struct {
Name string `json:"name"`
Type string `json:"type"`
Description string `json:"description"`
StopEngineOnError bool `json:"stopEngineOnError,omitempty"`
RunnerType string `json:"runnerType,omitempty"`
Imports []string `json:"imports,omitempty"`
ActionSettings map[string]map[string]any `json:"actionSettings,omitempty"`
Services []*ServiceConfig `json:"services,omitempty"`
DebugMode bool `json:"debugMode"`
MockFile string `json:"mockFile"`
GenMock bool `json:"genMock"`
OutputPath string `json:"outputPath,omitempty"`
AppPath string `json:"appPath"`
}
Config is the configuration for the Engine, assumes all necessary imports have been add to go code
Source Files
¶
Click to show internal directories.
Click to hide internal directories.