Documentation
¶
Index ¶
- Constants
- func ConfigOption(engineJson string, compressed bool) func(*engineImpl) error
- func ConfigViaEnv(e *engineImpl)
- func DirectRunner(e *engineImpl) error
- func EnvPropertyProcessor(properties map[string]interface{}) error
- func GetAIflowAppConfigPath() string
- func GetAIflowEngineConfigPath() string
- func GetAppName() string
- func GetAppPropertyValueResolvers(logger log.Logger) string
- func GetAppVersion() string
- func GetRunnerQueueSize() int
- func GetRunnerType() string
- func GetRunnerWorkers() int
- func IsSchemaSupportEnabled() bool
- func IsSchemaValidationEnabled() bool
- func LifeCycle(managedEntity managed.Managed)
- func LoadAppConfig(flowJson 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 = "AIFLOW_CONFIG_PATH" DefaultAppConfigLocation = "AIflow.json" EnvKeyEngineConfigLocation = "AIFLOW_ENG_CONFIG_PATH" DefaultEngineConfigLocation = "engine.json" EnvKeyStopEngineOnError = "AIFLOW_ENGINE_STOP_ON_ERROR" DefaultStopEngineOnError = true EnvKeyRunnerType = "AIFLOW_RUNNER_TYPE" DefaultRunnerType = ValueRunnerTypePooled EnvKeyPooledWorkers = "AIFLOW_POOLED_WORKERS" DefaultPooledWorkers = 1 EnvKeyPooledQueueSize = "AIFLOW_POOLED_QUEUE_SIZE" DefaultPooledQueueSize = 2 EnvAppPropertyResolvers = "AIFLOW_APP_PROP_RESOLVERS" EnvEnableSchemaSupport = "AIFLOW_SCHEMA_SUPPORT" EnvEnableSchemaValidation = "AIFLOW_SCHEMA_VALIDATION" 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 GetAIflowAppConfigPath ¶
func GetAIflowAppConfigPath() string
GetAIflowAppConfigPath returns the AIflow config path
func GetAIflowEngineConfigPath ¶
func GetAIflowEngineConfigPath() string
GetAIflowEngineConfigPath returns the AIflow 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]interface{} `json:"actionSettings,omitempty"` Services []*ServiceConfig `json:"services,omitempty"` }
Config is the configuration for the Engine, assumes all necessary imports have been add to go code
type Engine ¶
type Engine interface { //App get the application associated with this engine App() *app.App // Start starts the engine Start() error // Stop stop the engine Stop() error }
Interface for the engine behaviour
type ServiceConfig ¶
ServiceConfig is the configuration for Engine Services
Source Files
¶
Click to show internal directories.
Click to hide internal directories.