Documentation ¶
Index ¶
- type CaddyService
- type ErrorLogger
- type PrometheusModule
- func (PrometheusModule) CaddyModule() caddy.ModuleInfo
- func (m *PrometheusModule) Provision(ctx caddy.Context) error
- func (m PrometheusModule) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error
- func (m *PrometheusModule) SetupMetrics()
- func (m *PrometheusModule) UnmarshalCaddyfile(d *caddyfile.Dispenser) error
- func (m *PrometheusModule) Validate() error
- type PrometheusResponseWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CaddyService ¶
func (CaddyService) Handle ¶
func (c CaddyService) Handle(w http.ResponseWriter, r *http.Request) (int, error)
type ErrorLogger ¶
type ErrorLogger struct {
// contains filtered or unexported fields
}
func NewErrorLogger ¶
func NewErrorLogger(logger *zap.SugaredLogger) *ErrorLogger
func (*ErrorLogger) Println ¶
func (l *ErrorLogger) Println(args ...interface{})
type PrometheusModule ¶
type PrometheusModule struct { MetricsPath string `json:"metrics_path,omitempty"` MetricsHandler http.Handler Logger *zap.SugaredLogger // contains filtered or unexported fields }
func (PrometheusModule) CaddyModule ¶
func (PrometheusModule) CaddyModule() caddy.ModuleInfo
CaddyModule returns the Caddy module information.
func (*PrometheusModule) Provision ¶
func (m *PrometheusModule) Provision(ctx caddy.Context) error
Provision implements caddy.Provisioner.
func (PrometheusModule) ServeHTTP ¶
func (m PrometheusModule) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error
func (*PrometheusModule) SetupMetrics ¶
func (m *PrometheusModule) SetupMetrics()
func (*PrometheusModule) UnmarshalCaddyfile ¶
func (m *PrometheusModule) UnmarshalCaddyfile(d *caddyfile.Dispenser) error
UnmarshalCaddyfile implements caddyfile.Unmarshaler.
func (*PrometheusModule) Validate ¶
func (m *PrometheusModule) Validate() error
Validate implements caddy.Validator.
type PrometheusResponseWriter ¶
type PrometheusResponseWriter struct {
// contains filtered or unexported fields
}
func NewPrometheusResponseWriter ¶
func NewPrometheusResponseWriter(writer http.ResponseWriter) *PrometheusResponseWriter
func (PrometheusResponseWriter) Header ¶
func (pw PrometheusResponseWriter) Header() http.Header
func (PrometheusResponseWriter) Write ¶
func (pw PrometheusResponseWriter) Write(b []byte) (int, error)
func (PrometheusResponseWriter) WriteHeader ¶
func (pw PrometheusResponseWriter) WriteHeader(statusCode int)
Click to show internal directories.
Click to hide internal directories.