Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileOutput ¶
type FileOutput struct {
// contains filtered or unexported fields
}
FileOutput stores values needed by the File output
func (*FileOutput) Close ¶
func (o *FileOutput) Close(_ context.Context) (err error)
Close removes the files containing Prometheus configuration
func (*FileOutput) Write ¶
func (o *FileOutput) Write(ctx context.Context, scrapeConfigs []*types.ScrapeConfig) (err error)
Write writes Prometheus configuration to files
type HttpOutput ¶
type HttpOutput struct {
// contains filtered or unexported fields
}
HttpOutput stores values needed by the HTTP output
func (*HttpOutput) Close ¶
func (o *HttpOutput) Close(ctx context.Context) (err error)
Close shuts down the HTTP server serving Prometheus configuration
func (*HttpOutput) ServeHTTP ¶
func (o *HttpOutput) ServeHTTP(w http.ResponseWriter, _ *http.Request)
Write serves Prometheus configuration through an HTTP server
func (*HttpOutput) Write ¶
func (o *HttpOutput) Write(ctx context.Context, scrapeConfigs []*types.ScrapeConfig) (err error)
Write formats Prometheus configuration to be served through HTTP
type K8sSecretOutput ¶
type K8sSecretOutput struct {
// contains filtered or unexported fields
}
K8sSecretOutput stores data needed to fill a Kubernetes Secret
func (*K8sSecretOutput) Close ¶
func (o *K8sSecretOutput) Close(ctx context.Context) (err error)
Close deletes the Kubernetes Secret containing Prometheus configuration
func (*K8sSecretOutput) Write ¶
func (o *K8sSecretOutput) Write(ctx context.Context, scrapeConfigs []*types.ScrapeConfig) (err error)
Write writes Prometheus configuration to a Kubernetes Secret
type Output ¶
type Output interface {
Write(ctx context.Context, scrapeConfigs []*types.ScrapeConfig) (err error)
Close(ctx context.Context) (err error)
}
Output is an abstraction to the different output types
type StdoutOutput ¶
type StdoutOutput struct {
// contains filtered or unexported fields
}
StdoutOutput stores values needed to print output to stdout
func (*StdoutOutput) Close ¶
func (o *StdoutOutput) Close(_ context.Context) (err error)
Close does nothing
func (*StdoutOutput) Write ¶
func (o *StdoutOutput) Write(ctx context.Context, scrapeConfigs []*types.ScrapeConfig) (err error)
Write writes Prometheus configuration to stdout