{"version":3,"file":"OTLPExporterBase.mjs","names":[],"sources":["../src/OTLPExporterBase.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { ExportResult } from '@opentelemetry/core';\nimport type { IOtlpExportDelegate } from './otlp-export-delegate';\nimport { type ExporterMetrics } from './ExporterMetrics';\n\nexport class OTLPExporterBase<Internal> {\n  private _delegate: IOtlpExportDelegate<Internal>;\n  constructor(delegate: IOtlpExportDelegate<Internal>) {\n    this._delegate = delegate;\n  }\n\n  /**\n   * Export items.\n   * @param items\n   * @param resultCallback\n   */\n  export(\n    items: Internal,\n    resultCallback: (result: ExportResult) => void\n  ): void {\n    this._delegate.export(items, resultCallback);\n  }\n\n  forceFlush(): Promise<void> {\n    return this._delegate.forceFlush();\n  }\n\n  shutdown(): Promise<void> {\n    return this._delegate.shutdown();\n  }\n\n  protected setMetrics(metrics: ExporterMetrics<Internal>) {\n    this._delegate.setMetrics(metrics);\n  }\n}\n"],"mappings":";AASA,IAAa,mBAAb,MAAwC;CACtC;CACA,YAAY,UAAyC;EACnD,KAAK,YAAY;CACnB;;;;;;CAOA,OACE,OACA,gBACM;EACN,KAAK,UAAU,OAAO,OAAO,cAAc;CAC7C;CAEA,aAA4B;EAC1B,OAAO,KAAK,UAAU,WAAW;CACnC;CAEA,WAA0B;EACxB,OAAO,KAAK,UAAU,SAAS;CACjC;CAEA,WAAqB,SAAoC;EACvD,KAAK,UAAU,WAAW,OAAO;CACnC;AACF"}