A resource is extended component that represent the access to an external/internal resource, besides the error handling and identity, it has a start, stop and close methods to manage the resource lifecycle. It also has a checks property to define the checks that will be performed over the resource to achieve the resulted status. The most typical example of a resource are the Provider that allow to access to external databases, message brokers, etc.

Hierarchy

  • EventEmitter
    • Engine

Implements

Constructors

Accessors

  • get componentId(): string
  • Get the component identifier

    Returns string

  • get metrics(): Registry<"text/plain; version=0.0.4; charset=utf-8">
  • Return the metrics registry

    Returns Registry<"text/plain; version=0.0.4; charset=utf-8">

  • get name(): string
  • Get the name of the watcher

    Returns string

  • get status(): "pass" | "fail" | "warn"
  • Overall component status

    Returns "pass" | "fail" | "warn"

Methods

  • Close the file flinger

    Returns Promise<void>

  • Add a file to the be processed

    Parameters

    • filePath: string

    Returns Promise<void>

  • Start the file flinger

    Returns Promise<void>

  • Stop the file flinger

    Returns Promise<void>