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 ...@@ -2,6 +2,7 @@ package theodolite.util
/** /**
* Interface for parsers. * Interface for parsers.
* A parser allows the reading of files and creates a corresponding object from them.
*/ */
interface Parser { interface Parser {
/** /**
......
...@@ -3,13 +3,18 @@ package theodolite.util ...@@ -3,13 +3,18 @@ package theodolite.util
import io.quarkus.runtime.annotations.RegisterForReflection import io.quarkus.runtime.annotations.RegisterForReflection
/** /**
* Description of a Prometheus response. * This class corresponds to the JSON response format of a Prometheus
* * [range-query](https://www.prometheus.io/docs/prometheus/latest/querying/api/#range-queries)
* Based on [PromData]
*/ */
@RegisterForReflection @RegisterForReflection
data class PrometheusResponse( data class PrometheusResponse(
/**
* Indicates whether the query was successful.
*/
var status: String? = null, 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 var data: PromData? = null
) )
...@@ -20,23 +25,33 @@ data class PrometheusResponse( ...@@ -20,23 +25,33 @@ data class PrometheusResponse(
*/ */
@RegisterForReflection @RegisterForReflection
data class PromData( data class PromData(
/**
* Type of the result, either "matrix" | "vector" | "scalar" | "string"
*/
var resultType: String? = null, 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 var result: List<PromResult>? = null
) )
/** /**
* Description of a Prometheus result. * PromResult corresponds to the [range-vectors result format](https://www.prometheus.io/docs/prometheus/latest/querying/api/#range-vectors)
*
* Based on [PromMetric]
*/ */
@RegisterForReflection @RegisterForReflection
data class PromResult( data class PromResult(
/**
* Label of the metric
*/
var metric: PromMetric? = null, var metric: PromMetric? = null,
/**
* Values of the metric (e.g. [ [ <unix_time>, "<sample_value>" ], ... ])
*/
var values: List<Any>? = null 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 @RegisterForReflection
data class PromMetric( 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