transport

package
v0.0.0-...-4c031ee Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2022 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFlags

func AddFlags(app *kingpin.Application, runFlagSet *kingpin.CmdClause)

Types

type GetDatapointsRequest

type GetDatapointsRequest struct {
	Data       string               `json:"data"`
	Rule       string               `json:"rule"`
	Mode       collector.DataFormat `json:"mode"`
	LabelMatch map[string]string    `json:"label_match"`
}

type GetMetricsRequest

type GetMetricsRequest struct {
	Datapoints     []collector.Datapoint    `json:"datapoints"`
	RelabelConfigs collector.RelabelConfigs `json:"relabel_configs"`
	MetricConfig   collector.MetricConfig   `json:"metric_config"`
}

type HttpServer

type HttpServer struct {
	*http.ServeMux
	// contains filtered or unexported fields
}

func NewHttpServer

func NewHttpServer(logger log.Logger, sc *config.SafeConfig) (*HttpServer, error)

func (*HttpServer) HandleFunc

func (s *HttpServer) HandleFunc(pattern string, handler http.HandlerFunc)

func (*HttpServer) ListenAndServe

func (s *HttpServer) ListenAndServe(logger log.Logger) error

func (*HttpServer) ServeHTTP

func (s *HttpServer) ServeHTTP(writer http.ResponseWriter, request *http.Request)

type LoadDataRequest

type LoadDataRequest struct {
	DataFormat collector.DataFormat    `yaml:"data_format"`
	Datasource []*collector.Datasource `yaml:"datasource"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL