Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Reader

Class that supports reading metrics from S3. It initializes an S3 client, and then uses this to read metrics based on their key and a time interval.

Hierarchy

  • Reader

Index

Constructors

constructor

  • new Reader(s3Bucket: string, s3Client: S3): Reader

Properties

s3Bucket

s3Bucket: string

s3Client

s3Client: S3

Methods

readMetrics

  • Reads all the metrics for the given key that are within the given time interval.

    Parameters

    • key: MetricKey

      The metric we are looking for.

    • from: Date

      The date from which we want to read the metrics

    • to: Date

      The to date we want to read the metrics to.

    Returns Promise<Metric[]>

Private readMetricsFromObject

  • readMetricsFromObject(objectKey: string): Promise<Metric[]>

Static builder

Generated using TypeDoc