application

package
v0.0.0-...-7669f62 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Config   *configuration.Config
	Logger   *zap.Logger
	Closer   *xcloser.Closer
	Registry *prometheus.Registry
}

func New

func New(cfg *configuration.Config, logger *zap.Logger) *App

func (*App) RegisterMetrics

func (a *App) RegisterMetrics() *Metrics

func (*App) Run

func (a *App) Run() error

type Metrics

type Metrics struct {
	// contains filtered or unexported fields
}

func (*Metrics) Default

func (m *Metrics) Default() http.Handler

func (*Metrics) IncRequests

func (m *Metrics) IncRequests(method, path string, code int)

func (*Metrics) ObsDuration

func (m *Metrics) ObsDuration(method, path string, code int, duration float64)

type StatusCodeResponseWriter

type StatusCodeResponseWriter struct {
	http.ResponseWriter
	StatusCode int
}

func NewStatusCodeResponseWriter

func NewStatusCodeResponseWriter(w http.ResponseWriter) *StatusCodeResponseWriter

func (*StatusCodeResponseWriter) WriteHeader

func (lrw *StatusCodeResponseWriter) WriteHeader(code int)

Jump to

Keyboard shortcuts

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