Node SDK

Class ConfigProviderChain

Legend

  • Namespace
  • Variable
  • Function
  • Function with type parameter
  • Type alias
  • Type alias with type parameter
  • Class
  • Constructor
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Inherited property
  • Inherited method
  • Enumeration
  • Static property

Hierarchy

Index

Constructors

Properties

LeoCron: string
LeoEvent: string
LeoFirehoseStream: string
LeoKinesisStream: string
LeoS3: string
LeoSettings: string
LeoStream: string
LeoSystem?: string
Region: string
expireTime: number = 0
expired: boolean = false
expiryWindow: number = 15
returns

the number of seconds before {expireTime} during which the configuration will be considered expired.

providers: Provider[]
defaultProviders: Provider[] = ...

The default set of providers used by a vanilla ConfigProviderChain.

In Node.js:

RStreams.ConfigProviderChain.defaultProviders = [
function () { return new EnvironmentConfiguration('RSTREAMS_CONFIG'); },
function () { return new EnvironmentConfiguration('leosdk'); },
function () { return new EnvironmentConfiguration('leo-sdk'); },
function () { return new EnvironmentConfiguration('LEOSDK'); },
function () { return new EnvironmentConfiguration('LEO-SDK'); },
function () { return new LeoConfiguration(); },
function () { return new ObjectConfiguration(process, "leosdk"); },
function () { return new ObjectConfiguration(process, "leo-sdk"); },
function () { return new ObjectConfiguration(process, "rstreams_config"); },
function () { return new ObjectConfiguration(global, "leosdk"); },
function () { return new ObjectConfiguration(global, "leo-sdk"); },
function () { return new ObjectConfiguration(global, "rstreams_config"); },
function () {
return new FileTreeConfiguration(process.cwd(), [
"leo.config.json",
"leo.config.js",
"rstreams.config.json",
"rstreams.config.js",
"leoconfig.json",
"leoconfig.js",
"rstreamsconfig.json",
"rstreamsconfig.js",

"config/leo.config.json",
"config/leo.config.js",
"config/rstreams.config.json",
"config/rstreams.config.js",
"config/leoconfig.json",
"config/leoconfig.js",
"config/rstreamsconfig.json",
"config/rstreamsconfig.js",
]);
},
function () { return new AWSSecretsConfiguration('LEO_CONFIG_SECRET'); },
function () { return new AWSSecretsConfiguration('RSTREAMS_CONFIG_SECRET'); },

]

Methods

  • getSync(): void
  • Gets the existing configuration, refreshing them if they are not yet loaded or have expired. Users should call this method before using {refresh}, as this will not attempt to reload configuration when they are already loaded into the object.

    Returns void

  • needsRefresh(): boolean
  • refreshSync(): void
  • Refreshes the configuration. Users should call {get} before attempting to forcibly refresh configuration.

    note

    Subclasses should override this class to reset then configuration object and then call the callback with any error information.

    see

    get

    Returns void

  • resolveSync(): any
  • update(config?: any): void

Generated using TypeDoc