Skip to content
Snippets Groups Projects
Commit 91f2ad4c authored by Benedikt Wetzel's avatar Benedikt Wetzel
Browse files

Enhance KDoc

parent 3a1437b0
No related branches found
No related tags found
4 merge requests!159Re-implementation of Theodolite with Kotlin/Quarkus,!157Update Graal Image in CI pipeline,!112Add Kdoc,!83WIP: Re-implementation of Theodolite with Kotlin/Quarkus
......@@ -2,6 +2,7 @@ package theodolite.util
/**
* Interface for parsers.
* A parser allows the reading of files and creates a corresponding object from them.
*/
interface Parser {
/**
......
......@@ -3,13 +3,18 @@ package theodolite.util
import io.quarkus.runtime.annotations.RegisterForReflection
/**
* Description of a Prometheus response.
*
* Based on [PromData]
* This class corresponds to the JSON response format of a Prometheus
* [range-query](https://www.prometheus.io/docs/prometheus/latest/querying/api/#range-queries)
*/
@RegisterForReflection
data class PrometheusResponse(
/**
* Indicates whether the query was successful.
*/
var status: String? = null,
/**
* The data section of the query result contains the information about the resultType and the values itself.
*/
var data: PromData? = null
)
......@@ -20,23 +25,33 @@ data class PrometheusResponse(
*/
@RegisterForReflection
data class PromData(
/**
* Type of the result, either "matrix" | "vector" | "scalar" | "string"
*/
var resultType: String? = null,
/**
* Result of the range-query. In the case of range-query this corresponds to the [range-vectors result format](https://www.prometheus.io/docs/prometheus/latest/querying/api/#range-vectors)
*/
var result: List<PromResult>? = null
)
/**
* Description of a Prometheus result.
*
* Based on [PromMetric]
* PromResult corresponds to the [range-vectors result format](https://www.prometheus.io/docs/prometheus/latest/querying/api/#range-vectors)
*/
@RegisterForReflection
data class PromResult(
/**
* Label of the metric
*/
var metric: PromMetric? = null,
/**
* Values of the metric (e.g. [ [ <unix_time>, "<sample_value>" ], ... ])
*/
var values: List<Any>? = null
)
/**
* Description of a query in PromQL.
* Corresponds to the metric field in the range-vector result format of a Prometheus range-query response.
*/
@RegisterForReflection
data class PromMetric(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment