Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisteredExporterIDs ¶
func RegisteredExporterIDs() []string
RegisteredExporterIDs returns a list of all registered exporter IDs.
Types ¶
type BaseExporter ¶
type BaseExporter struct {
// contains filtered or unexported fields
}
BaseExporter implements basic exporter functionality common to all exporters.
func (*BaseExporter) Activate ¶
func (exporter *BaseExporter) Activate(conf *config.Configuration, log *zerolog.Logger) error
Activate activates the exporter.
func (*BaseExporter) Start ¶
func (exporter *BaseExporter) Start() error
Start starts the exporter; only exporters which perform periodical background tasks should do something here.
func (*BaseExporter) Stop ¶
func (exporter *BaseExporter) Stop()
Stop stops any running background activities of the exporter.
func (*BaseExporter) UpdateMeshData ¶
func (exporter *BaseExporter) UpdateMeshData(meshData *meshdata.MeshData) error
UpdateMeshData is called whenever the mesh data has changed to reflect these changes.
type BaseRequestExporter ¶
type BaseRequestExporter struct { BaseExporter // contains filtered or unexported fields }
BaseRequestExporter implements basic exporter functionality common to all request exporters.
func (*BaseRequestExporter) Endpoint ¶
func (exporter *BaseRequestExporter) Endpoint() string
Endpoint returns the (relative) endpoint of the exporter.
func (*BaseRequestExporter) HandleRequest ¶
func (exporter *BaseRequestExporter) HandleRequest(resp http.ResponseWriter, req *http.Request) error
HandleRequest handles the actual HTTP request.
func (*BaseRequestExporter) WantsRequest ¶
func (exporter *BaseRequestExporter) WantsRequest(r *http.Request) bool
WantsRequest returns whether the exporter wants to handle the incoming request.
type CS3APIExporter ¶
type CS3APIExporter struct {
BaseRequestExporter
}
CS3APIExporter implements the CS3API exporter.
func (*CS3APIExporter) Activate ¶
func (exporter *CS3APIExporter) Activate(conf *config.Configuration, log *zerolog.Logger) error
Activate activates the exporter.
func (*CS3APIExporter) GetName ¶
func (exporter *CS3APIExporter) GetName() string
GetName returns the display name of the exporter.
type Exporter ¶
type Exporter interface { // Activate activates the exporter. Activate(conf *config.Configuration, log *zerolog.Logger) error // Start starts the exporter; only exporters which perform periodical background tasks should do something here. Start() error // Stop stops any running background activities of the exporter. Stop() // UpdateMeshData is called whenever the mesh data has changed to reflect these changes. UpdateMeshData(*meshdata.MeshData) error // GetName returns the display name of the exporter. GetName() string }
Exporter is the interface that all exporters must implement.
func AvailableExporters ¶
func AvailableExporters(conf *config.Configuration) ([]Exporter, error)
AvailableExporters returns a list of all exporters that are enabled in the configuration.
type PrometheusSDExporter ¶ added in v1.3.0
type PrometheusSDExporter struct { BaseExporter // contains filtered or unexported fields }
PrometheusSDExporter implements various Prometheus Service Discovery scrape config exporters.
func (*PrometheusSDExporter) Activate ¶ added in v1.3.0
func (exporter *PrometheusSDExporter) Activate(conf *config.Configuration, log *zerolog.Logger) error
Activate activates the exporter.
func (*PrometheusSDExporter) GetName ¶ added in v1.3.0
func (exporter *PrometheusSDExporter) GetName() string
GetName returns the display name of the exporter.
func (*PrometheusSDExporter) UpdateMeshData ¶ added in v1.3.0
func (exporter *PrometheusSDExporter) UpdateMeshData(meshData *meshdata.MeshData) error
UpdateMeshData is called whenever the mesh data has changed to reflect these changes.
type RequestExporter ¶
type RequestExporter interface { Exporter // Endpoint returns the (relative) endpoint of the exporter. Endpoint() string // WantsRequest returns whether the exporter wants to handle the incoming request. WantsRequest(r *http.Request) bool // HandleRequest handles the actual HTTP request. HandleRequest(resp http.ResponseWriter, req *http.Request) error }
RequestExporter is the interface implemented by exporters that offer an HTTP endpoint.
type SiteLocationsExporter ¶
type SiteLocationsExporter struct {
BaseRequestExporter
}
SiteLocationsExporter implements the Site Locations exporter to use with Grafana.
func (*SiteLocationsExporter) Activate ¶
func (exporter *SiteLocationsExporter) Activate(conf *config.Configuration, log *zerolog.Logger) error
Activate activates the exporter.
func (*SiteLocationsExporter) GetName ¶
func (exporter *SiteLocationsExporter) GetName() string
GetName returns the display name of the exporter.
type WebAPIExporter ¶
type WebAPIExporter struct {
BaseRequestExporter
}
WebAPIExporter implements the generic Web API exporter.
func (*WebAPIExporter) Activate ¶
func (exporter *WebAPIExporter) Activate(conf *config.Configuration, log *zerolog.Logger) error
Activate activates the exporter.
func (*WebAPIExporter) GetName ¶
func (exporter *WebAPIExporter) GetName() string
GetName returns the display name of the exporter.