Documentation
¶
Index ¶
- func AddMetricsHandler(handler http.HandlerFunc, host string, port int) http.HandlerFunc
- func AttachExternalWatcher(endpointURL url.URL, metricsOptions MetricOptions, label string, ...)
- func AttachSwarmWatcher(dockerClient *client.Client, metricsOptions MetricOptions, label string)
- func PrometheusHandler() http.Handler
- func RegisterMetrics(metricsOptions MetricOptions)
- type MetricOptions
- type PrometheusQuery
- type VectorQueryResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddMetricsHandler ¶
func AddMetricsHandler(handler http.HandlerFunc, host string, port int) http.HandlerFunc
AddMetricsHandler wraps a http.HandlerFunc with Prometheus metrics
func AttachExternalWatcher ¶
func AttachSwarmWatcher ¶
func AttachSwarmWatcher(dockerClient *client.Client, metricsOptions MetricOptions, label string)
AttachSwarmWatcher adds a go-route to monitor the amount of service replicas in the swarm matching a 'function' label.
func PrometheusHandler ¶
PrometheusHandler Bootstraps prometheus for metrics collection
func RegisterMetrics ¶
func RegisterMetrics(metricsOptions MetricOptions)
RegisterMetrics registers with Prometheus for tracking
Types ¶
type MetricOptions ¶
type MetricOptions struct { GatewayFunctionInvocation *prometheus.CounterVec GatewayFunctionsHistogram *prometheus.HistogramVec ServiceReplicasCounter *prometheus.GaugeVec }
MetricOptions to be used by web handlers
func BuildMetricsOptions ¶
func BuildMetricsOptions() MetricOptions
BuildMetricsOptions builds metrics for tracking functions in the API gateway
type PrometheusQuery ¶
PrometheusQuery a PrometheusQuery
func NewPrometheusQuery ¶
func NewPrometheusQuery(host string, port int, client *http.Client) PrometheusQuery
NewPrometheusQuery create a NewPrometheusQuery
func (*PrometheusQuery) Fetch ¶
func (q *PrometheusQuery) Fetch(query string) (*VectorQueryResponse, error)
Fetch queries aggregated stats
type VectorQueryResponse ¶
Click to show internal directories.
Click to hide internal directories.