Documentation ¶
Index ¶
- func GenerateNativeQueries(proto string, tslQuery string, defaultToken string, allowAuthenticate bool) (string, error)
- func GenerateNativeQueriesWithParams(proto string, tslQuery string, defaultToken string, allowAuthenticate bool, ...) (string, error)
- func GetTokenFromBasicAuth(request *http.Request) string
- type PromData
- type PromError
- type ProxyTSL
- type Request
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateNativeQueries ¶
func GenerateNativeQueries(proto string, tslQuery string, defaultToken string, allowAuthenticate bool) (string, error)
GenerateNativeQueries Generate a TSL query in its native proto format allowAuthenticate works only for a Warp 10 backend (force a Token authenticate to raise native limits)
func GenerateNativeQueriesWithParams ¶
func GenerateNativeQueriesWithParams(proto string, tslQuery string, defaultToken string, allowAuthenticate bool, params map[string]string) (string, error)
GenerateNativeQueriesWithParams Generate a TSL query in its native proto format with a param map replacing query headers allowAuthenticate works only for a Warp 10 backend (force a Token authenticate to raise native limits)
func GetTokenFromBasicAuth ¶
GetTokenFromBasicAuth is fetching the token for an HTTP Request
Types ¶
type PromData ¶
type PromData struct { ResultType string `json:"resultType,omitempty"` Result string `json:"result,omitempty"` }
PromData Internal prom error data, loaded internally only on error
type PromError ¶
type PromError struct { Status string `json:"status,omitempty"` Data PromData `json:"data,omitempty"` ErrorType string `json:"errorType,omitempty"` Error string `json:"error,omitempty"` }
PromError Internal prom error message, loaded internally only on error
type ProxyTSL ¶
type ProxyTSL struct { ReqCounter prometheus.Counter ErrCounter prometheus.Counter WarnCounter prometheus.Counter }
Tsl struct
func NewProxyTSL ¶
func NewProxyTSL(promRegistry *prometheus.Registry) *ProxyTSL
NewProxyTSL is creating a new tsl proxy query handler