Node SDK

Class default

Legend

  • Namespace
  • Variable
  • Function
  • Function with type parameter
  • Type alias
  • Type alias with type parameter
  • Class
  • Constructor
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Enumeration

Represents your RSTREAMS configuration Creating a Configuration object allows you to pass around your coinfig information to configuration and service objects.

Expiring and Refreshing Configuration

Occasionally configuration can expire in the middle of a long-running application. In this case, the SDK will automatically attempt to refresh the configuration from the storage location if the Configuration class implements the {refresh} method.

If you are implementing a configuration storage location, you will want to create a subclass of the Configuration class and override the {refresh} method. This method allows configuration to be retrieved from the backing store, be it a file system, database, or some network storage. The method should reset the configuration attributes on the object.

!attribute

expired

returns

whether the configuration have been expired and require a refresh. Used in conjunction with {expireTime}.

!attribute

expireTime

returns

a time when configuration should be considered expired. Used in conjunction with {expired}.

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.

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
  • note

    Subclasses should override this method to provide custom refresh logic.

    Returns boolean

    whether the configuration object should call {refresh}

  • 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(): { LeoCron: string; LeoEvent: string; LeoFirehoseStream: string; LeoKinesisStream: string; LeoS3: string; LeoSettings: string; LeoStream: string; LeoSystem: string; Region: string }
  • Returns { LeoCron: string; LeoEvent: string; LeoFirehoseStream: string; LeoKinesisStream: string; LeoS3: string; LeoSettings: string; LeoStream: string; LeoSystem: string; Region: string }

    • LeoCron: string
    • LeoEvent: string
    • LeoFirehoseStream: string
    • LeoKinesisStream: string
    • LeoS3: string
    • LeoSettings: string
    • LeoStream: string
    • LeoSystem: string
    • Region: string
  • update(config?: any): void

Generated using TypeDoc