Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Assiciated with the Status of the exporter ReadyStatus = "ready" InitializedStatus = "initialized" RunningStatus = "running" ClosedStatus = "closed" )
View Source
var ( // TODO: Just hardcoded, move to config ExposedPort string = "9080" EndpointUrl string = "metrics" MetricLoopInterval time.Duration = 15 * time.Second )
View Source
var ( NewExporterCheckInterval = 2 * time.Minute ModuleName = "EXPORTER" )
Functions ¶
This section is empty.
Types ¶
type ExporterService ¶
type ExporterService struct { PrometheusRunner PrometheusRunner ExporterRoutines map[string]Exporter // contains filtered or unexported fields }
func NewExporterService ¶
func NewExporterService(ctx context.Context) *ExporterService
Creates and initialized the exporter service where any module can create a dedicated exporter
func (*ExporterService) AddNewExporter ¶
func (s *ExporterService) AddNewExporter(exptr Exporter)
add new exporter to the list of exporters
func (*ExporterService) Close ¶
func (s *ExporterService) Close()
Close all the running metrics exposers
func (*ExporterService) Run ¶
func (s *ExporterService) Run()
type MetricsExporter ¶
type MetricsExporter struct {
// contains filtered or unexported fields
}
func NewMetricsExporter ¶
func (*MetricsExporter) Close ¶
func (e *MetricsExporter) Close()
func (MetricsExporter) Details ¶
func (e MetricsExporter) Details() string
func (*MetricsExporter) Init ¶
func (e *MetricsExporter) Init()
func (MetricsExporter) Name ¶
func (e MetricsExporter) Name() string
func (*MetricsExporter) Run ¶
func (e *MetricsExporter) Run()
func (MetricsExporter) Status ¶
func (e MetricsExporter) Status() string
type PrometheusRunner ¶
func NewPrometheusRunner ¶
func NewPrometheusRunner() PrometheusRunner
func (*PrometheusRunner) Start ¶
func (c *PrometheusRunner) Start() error
Click to show internal directories.
Click to hide internal directories.