Create an instance of the acklo client.
Once the instance has been created you will be able to get configuration values for your application, however these will not be the latest values configured on the acklo dashboard. In order to get the latest values you'll first need to connect to acklo by calling connect on your instance.
Most of the properties used to configure the instance can also be set as environment variables. There are more details on this in the ClientConfigurationProperties docs.
Establish a connection to acklo.
Once the connection has been established you'll be able to get the latest configuration values from the acklo dashboard and set up listeners so you get notified the instant that a configuration value changes.
Whether to continue execution without throwing after an error in conencting to acklo has occurred.
Default is true
.
Disconnect from acklo.
Once you've disconnected you will no longer receive configuration updates
from acklo. It's recommended that you call this method when your application is shutting down
(e.g. when it receives SIGTERM
) in order to gracefully close any open sockets the acklo client
has established.
Returns the latest config value for the given property.
This will return the default values specified in your acklo configuration file (acklo.config.yml
) until
the client has been successfully connected to acklo by using the connect method.
undefined
will be returned if you try to get a value for a config property that does not exist.
the ID of the config value you want to get (e.g. "config.port"
)
Returns the latest config for your application.
This will return the default values specified in your acklo configuration file (acklo.config.yml
) until
the client has been successfully connected to acklo by using the connect method.
Returns the latest config for your application, but unlike getConfig does not try to coerce the values stored on the acklo backend to native Javascript types (i.e. booleans, numbers, etc). Instead it returns all values as strings and lets you do your own coercion.
Unless you have a good reason to use this method, you probably want getConfig instead.
This will return the default values specified in your acklo configuration file (acklo.config.yml
) until
the client has been successfully connected to acklo by using the connect method.
Returns the name of this application instance as displayed on the acklo dashboard.
This will only return a value once the client has been successfully connected to acklo by using the connect method.
The instance name is randomly generated by acklo and is a combination of some recognizable words and random characters.
Returns the URL at which you can see this instance on the acklo dashboard.
This will only return a value once the client has been successfully connected to acklo by using the connect method.
Returns the latest config value for the given property, but unlike get does not try to coerce the values stored on the acklo backend to native JavaScript types (i.e. booleans, numbers, etc). Instead it returns all values as strings and lets you do your own coercion.
Unless you have a good reason to use this method, you probably want get instead.
This will return the default values specified in your acklo configuration file (acklo.config.yml
) until
the client has been successfully connected to acklo by using the connect method.
undefined
will be returned if you try to get a value for a config property that does not exist.
Registers the given callback to run as soon as an update is made to this application's config. This allows you to react immediately to configuration changes without needing to poll the get method.
Generated using TypeDoc
An instance of the acklo client, which can be used for connecting to acklo, retrieving remote configuration for your app, and adding listeners for live updates to your app's configuration.
For extended documentation and getting started guides, check out acklo docs.