Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Metrics

class

Metrics holds all the accessible parts of influx-metrics API

Hierarchy

  • Metrics

Index

Constructors

constructor

Properties

Private book

book: IBook

Private client

client: InfluxDB

Private db

db: string = ""

Private defaultOptions

defaultOptions: IMetricsOption

Methods

Private ensureOptions

  • ensureOptions(): void
  • function

    ensureOptions

    ensures all the options inside IMetricOption are set to default values

    Returns void

express

  • express(req: Request, res: Response, next: NextFunction): void
  • Parameters

    • req: Request
    • res: Response
    • next: NextFunction

    Returns void

Private initDb

  • initDb(onConnected?: undefined | function): void
  • method

    Initialize this.influx and post callback to onConnected

    Parameters

    • Optional onConnected: undefined | function

      callback for when influx db connection is initialized

    Returns void

log

  • log(message: string, severity: Severity): void

record

  • record(measurement: string, point: IPoint): Promise<void>
  • records the point that forces it to keep it as a noddpoint interface

    Parameters

    • measurement: string

      name of the measurement

    • point: IPoint

      point that

    Returns Promise<void>

recordInterval

  • recordInterval(measurement: string, func: function, interval: number): void
  • Parameters

    • measurement: string
    • func: function
        • (): IPoint
        • Returns IPoint

    • interval: number

    Returns void

stopRecording

  • stopRecording(measurement: string): void
  • Parameters

    • measurement: string

    Returns void

Generated using TypeDoc