Tento dokument byl přeložen pomocí AI. Pro přesné informace se podívejte na anglickou verzi.
constructor()Konstruktor pro vytvoření instance třídy Metric.
constructor(options?: MetricOptions)| Vlastnost | Typ | Popis | Výchozí hodnota |
|---|---|---|---|
meterName | string | Identifikátor meteru | nocobase-meter |
version | string | Aktuální verze NocoBase | |
readerName | string | string[] | Identifikátor(y) registrovaných MetricReader, které se mají použít |
init()Inicializuje MetricProvider.
init(): voidregisterReader()Registruje MetricReader.
registerReader(name: string, reader: GetMetricReader)| Parametr | Typ | Popis |
|---|---|---|
name | string | Jedinečný identifikátor MetricReader |
reader | () => MetricReader | Metoda pro získání MetricReader |
addView()Přidá View. Viz Configure Metric Views.
addView(...view: View[])getMeter()Získá Meter.
getMeter(name?: string, version?: string)| Parametr | Typ | Popis | Výchozí hodnota |
|---|---|---|---|
name | string | Identifikátor meteru | nocobase-meter |
version | string | Aktuální verze NocoBase |
start()Spustí MetricReader.
start(): voidshutdown()Zastaví MetricReader.
shutdown(): Promise<void>