You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// API is the struct that manages the different endpoint provided by the langServer.
77
+
// It also takes care of creating all necessary HTTP middleware.
76
78
typeAPIstruct {
77
79
langServer langserver.HeadlessServer
78
80
mdws []middlewareFunc
79
81
enableMetricsbool
80
82
}
81
83
82
-
// NewLangServerAPI create a new instance of the Stateless API to use the LangServer through HTTP.
84
+
// NewLangServerAPI creates a new instance of the Stateless API to use the LangServer through HTTP.
83
85
//
84
86
// If metadata is fetched from a remote Prometheus, the metadataService
85
87
// implementation from the promql-langserver/prometheus package can be used,
86
88
// otherwise you need to provide your own implementation of the interface.
87
89
//
88
90
// The provided Logger should be synchronized.
89
91
//
90
-
// In case "enableMetrics" is set to true, endpoint /metrics is then available and a middleware that instrument the different endpoints provided is instantiated.
91
-
// Don't use it in case you have already in place such middleware.
92
+
// In case "enableMetrics" is set to true, endpoint /metrics is then available and a middleware that instruments the different endpoints provided is instantiated.
93
+
// Don't use it in case you already have such middleware in place.
Copy file name to clipboardExpand all lines: rest/doc.go
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -26,10 +26,10 @@ Supported endpoints:
26
26
All endpoint are only available through the HTTP method POST. For each request, you have to provide the following JSON:
27
27
28
28
{
29
-
"expr": "a promQL expression" # Mandatory for all available endpoint
30
-
"limit": 45 # Optional. It will be used only for the endpoint /diagnostics and /completion. It's the maximum number of result returned.
29
+
"expr": "a PromQL expression" # Mandatory for all available endpoints
30
+
"limit": 45 # Optional. It will be used only for the endpoints /diagnostics and /completion. It's the maximum number of result returned.
31
31
"positionLine": 0 # Mandatory for the endpoints /signatureHelp, /hover and /completion. The line (0 based) for which the metadata is queried.
32
-
"positionChar": 2 # Mandatory for the endpoints /signatureHelp, /hover and /completion. The column (0 based) for which the metadata is queried. Characters are counted as UTF16 Codepoints.
32
+
"positionChar": 2 # Mandatory for the endpoints /signatureHelp, /hover and /completion. The column (0 based) for which the metadata is queried. Characters are counted as UTF-16 code points.
0 commit comments