Skip to main content
Access via:io.appManager

App Management API.

Properties (3)

Property Type Default Required Description
inMemory⚓︎ InMemoryStore x

API for handling app definitions at runtime.

myApplication⚓︎ Application x

Returns the current app.

myInstance⚓︎ Instance x

Returns the current app instance.

17 Methods

application()⚓︎

(name: string) => Application | undefined

Retrieves an app by name.

Parameters (1)

Name Type Required Description
name⚓︎ string

Name of the desired app.

applications()⚓︎

() => Application[]

Retrieves a collection of the available apps.

exit()⚓︎

(options?: ExitOpts) => Promise<any>

Exits io.Connect.

Parameters (1)

Name Type Required Description
options⚓︎ ExitOpts x x

getConfigurations()⚓︎

(apps?: string[]) => Promise<Definition[]>

Retrieves the configurations of the specified apps.

Parameters (1)

Name Type Required Description
apps⚓︎ string[] x

List of names of the apps for which to retrieve configurations.

instances()⚓︎

() => Instance[]

Retrieves a collection of all running app instances.

onAppAdded()⚓︎

(callback: (app: Application) => any) => UnsubscribeFunction

Notifies when an app is registered in the environment.

Parameters (1)

Name Type Required Description
callback⚓︎ (app: Application) => any

Callback function for handling the event.

onAppAvailable()⚓︎

(callback: (app: Application) => any) => UnsubscribeFunction

Notifies when an app is available and can be started.

Parameters (1)

Name Type Required Description
callback⚓︎ (app: Application) => any

Callback function for handling the event.

onAppChanged()⚓︎

(callback: (app: Application) => any) => UnsubscribeFunction

Notifies when the configuration for an app has changed.

Parameters (1)

Name Type Required Description
callback⚓︎ (app: Application) => any

Callback function for handling the event.

onAppRemoved()⚓︎

(callback: (app: Application) => any) => UnsubscribeFunction

Notifies when an app is removed from the environment.

Parameters (1)

Name Type Required Description
callback⚓︎ (app: Application) => any

Callback function for handling the event.

onAppUnavailable()⚓︎

(callback: (app: Application) => any) => UnsubscribeFunction

Notifies when an app is no longer available and can't be started.

Parameters (1)

Name Type Required Description
callback⚓︎ (app: Application) => any

Callback function for handling the event.

onInstanceStarted()⚓︎

(callback: (instance: Instance) => any) => UnsubscribeFunction

Notifies when a new app instance is started.

Parameters (1)

Name Type Required Description
callback⚓︎ (instance: Instance) => any

Callback function for handling the event.

onInstanceStartFailed()⚓︎

(callback: (instance: Instance) => any) => UnsubscribeFunction

Notifies when starting a new app instance has failed.

Parameters (1)

Name Type Required Description
callback⚓︎ (instance: Instance) => any

Callback function for handling the event.

onInstanceStopped()⚓︎

(callback: (instance: Instance) => any) => UnsubscribeFunction

Notifies when an app instance is stopped.

Parameters (1)

Name Type Required Description
callback⚓︎ (instance: Instance) => any

Callback function for handling the event.

onInstanceUpdated()⚓︎

(callback: (instance: Instance) => any) => UnsubscribeFunction

Notifies when an app instance is updated.

Parameters (1)

Name Type Required Description
callback⚓︎ (instance: Instance) => any

Callback function for handling the event.

onShuttingDown()⚓︎

(callback: (args: ShuttingDownEventArgs) => Promise<{ prevent: boolean }>) => void

Notifies when io.Connect will shut down or restart. If the callback is asynchronous, it will be awaited up to 60 seconds before shutdown continues.

Parameters (1)

Name Type Required Description
callback⚓︎ (args: ShuttingDownEventArgs) => Promise<{ prevent: boolean }>

Callback function for handling the event.

ready()⚓︎

() => Promise<void>

Notifies when the App Management API is ready to be used.

restart()⚓︎

(options?: ExitOpts) => Promise<any>

Restarts io.Connect.

Parameters (1)

Name Type Required Description
options⚓︎ ExitOpts x x