app

package
v1.6.26 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: BSD-3-Clause Imports: 28 Imported by: 20 modules, 22 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	FAILED   = "Failed"
	STARTED  = "Started"
	STARTING = "Starting"
	STOPPING = "Stopping"
	STOPPED  = "Stopped"
)
View Source
const (
	EnvKeyDelayedAppStopInterval = "FLOGO_APP_DELAYED_STOP_INTERVAL"
	EnvKeyEnableFlowControl      = "FLOGO_APP_ENABLE_FLOW_CONTROL"
)
View Source
const (
	AlreadyControlled = "app is already event flow controlled"
)
View Source
const AppEventType = "appevent"

Variables

This section is empty.

Functions

func ContinueOnError

func ContinueOnError(a *App) error

func DeleteValue added in v1.3.0

func DeleteValue(name string)

DeleteValue remove an app attribute

func EnableFlowControl added in v1.3.0

func EnableFlowControl() bool

func EngineSettings added in v0.9.4

func EngineSettings(svcManager *service.Manager, actionSettings map[string]map[string]interface{}) func(*App) error

func FinalizeProperties

func FinalizeProperties(processors ...property.PostProcessor) func(*App) error

func GetDelayedStopInterval added in v0.9.4

func GetDelayedStopInterval() string

func GetValue

func GetValue(name string) (value interface{}, exists bool)

GetValue gets an app attribute value

func SetValue

func SetValue(name string, value interface{}) error

SetValue sets an app attribute value

Types

type App

type App struct {
	// contains filtered or unexported fields
}

func New

func New(config *Config, runner action.Runner, options ...Option) (*App, error)

func (*App) GetProperty

func (a *App) GetProperty(name string) (interface{}, bool)

func (*App) GetResource

func (a *App) GetResource(id string) *resource.Resource

func (*App) Name

func (a *App) Name() interface{}

func (*App) PostAppEvent added in v0.9.4

func (a *App) PostAppEvent(appStatus Status)

func (*App) Reconfigure added in v1.6.4

func (a *App) Reconfigure() error

Reconfigure function restarts the app. Calls run one at a time: an overlapping call waits for the running one.

func (*App) ResourceManager

func (a *App) ResourceManager() *resource.Manager

func (*App) RuntimeSettings added in v0.9.4

func (a *App) RuntimeSettings() map[string]interface{}

func (*App) ServiceManager added in v0.9.4

func (a *App) ServiceManager() *service.Manager

func (*App) Start

func (a *App) Start() error

func (*App) Stop

func (a *App) Stop() error

func (*App) TriggerStatuses

func (a *App) TriggerStatuses() []*managed.StatusInfo

TriggerStatuses gets the status information for the triggers

func (*App) Version

func (a *App) Version() interface{}

type AppEvent added in v0.9.4

type AppEvent interface {
	AppName() string
	AppVersion() string
	AppStatus() Status
	AppEnv() string
}

type AppResolver

type AppResolver struct {
}

func (*AppResolver) GetResolverInfo

func (r *AppResolver) GetResolverInfo() *resolve.ResolverInfo

func (*AppResolver) Resolve

func (r *AppResolver) Resolve(scope data.Scope, itemName, valueName string) (interface{}, error)

type Config

type Config struct {
	Name        string `json:"name"`
	Type        string `json:"type"`
	Version     string `json:"version"`
	Description string `json:"description"`
	AppModel    string `json:"appModel"`

	Imports     []string                      `json:"imports,omitempty"`
	Properties  []*data.Attribute             `json:"properties,omitempty"`
	Channels    []string                      `json:"channels,omitempty"`
	Triggers    []*trigger.Config             `json:"triggers"`
	Resources   []*resource.Config            `json:"resources,omitempty"`
	Actions     []*action.Config              `json:"actions,omitempty"`
	Schemas     map[string]*schema.Def        `json:"schemas,omitempty"`
	Connections map[string]*connection.Config `json:"connections,omitempty"`
}

Config is the configuration for the App

type Controller added in v1.3.0

type Controller interface {
	StartControl() error
	ReleaseControl() error
}

func GetEventFlowController added in v1.6.0

func GetEventFlowController() Controller

type LifecycleAware added in v1.1.0

type LifecycleAware interface {
	OnStartup() error
	OnShutdown() error
}

type Option

type Option func(*App) error

type Status added in v0.9.4

type Status string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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