engine

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2019 License: BSD-3-Clause Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvKeyAppConfigLocation  = "FLOGO_CONFIG_PATH"
	DefaultAppConfigLocation = "flogo.json"
	EnvKeyStopEngineOnError  = "FLOGO_ENGINE_STOP_ON_ERROR"
	DefaultStopEngineOnError = true
	EnvKeyRunnerType         = "FLOGO_RUNNER_TYPE"
	DefaultRunnerType        = ValueRunnerTypePooled
	EnvKeyRunnerWorkers      = "FLOGO_RUNNER_WORKERS"
	DefaultRunnerWorkers     = 5
	EnvKeyRunnerQueueSize    = "FLOGO_RUNNER_QUEUE"
	DefaultRunnerQueueSize   = 50

	EnvAppPropertyResolvers   = "FLOGO_APP_PROP_RESOLVERS"
	EnvEnableSchemaSupport    = "FLOGO_SCHEMA_SUPPORT"
	EnvEnableSchemaValidation = "FLOGO_SCHEMA_VALIDATION"

	ValueRunnerTypePooled = "POOLED"
	ValueRunnerTypeDirect = "DIRECT"

	PropertyResolverEnv  = "env"
	PropertyResolverJson = "json"
)

Variables

This section is empty.

Functions

func ConfigViaEnv

func ConfigViaEnv(e *engineImpl)

func DirectRunner

func DirectRunner(e *engineImpl)

func EnvPropertyProcessor

func EnvPropertyProcessor(properties map[string]interface{}) error

func GetAppName

func GetAppName() string

Returns name of the application

func GetAppPropertyValueResolvers

func GetAppPropertyValueResolvers(logger log.Logger) string

func GetAppVersion

func GetAppVersion() string

Returns version of the application

func GetFlogoConfigPath

func GetFlogoConfigPath() string

GetFlogoConfigPath returns the flogo config path

func GetRunnerQueueSize

func GetRunnerQueueSize() int

GetRunnerQueueSize returns the runner queue size

func GetRunnerType

func GetRunnerType() string

GetRunnerType returns the runner type

func GetRunnerWorkers

func GetRunnerWorkers() int

GetRunnerWorkers returns the number of workers to use

func IsSchemaSupportEnabled

func IsSchemaSupportEnabled() bool

func IsSchemaValidationEnabled

func IsSchemaValidationEnabled() bool

func LifeCycle

func LifeCycle(managedEntity managed.Managed)

func LoadAppConfig

func LoadAppConfig(flogoJson string, compressed bool) (*app.Config, error)

func NewPooledRunnerConfig

func NewPooledRunnerConfig() *runner.PooledConfig

NewPooledRunnerConfig creates a new Pooled config, looks for environment variables to override default values

func RunEngine

func RunEngine(e Engine) int

func StopEngineOnError

func StopEngineOnError() bool

Types

type Config

type Config struct {
	//LogLevel          string
	StopEngineOnError bool
	RunnerType        string
}

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

func New

func New(appConfig *app.Config, options ...Option) (Engine, error)

New creates a new Engine

type Option

type Option func(*engineImpl)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL