Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // HTTPRequestsTotal counts total HTTP requests by method and path. HTTPRequestsTotal = prometheus.NewCounterVec( prometheus.CounterOpts{ Name: "vocnet_http_requests_total", Help: "Total number of HTTP requests", }, []string{"method", "path", "status"}, ) // HTTPRequestDuration tracks HTTP request latency. HTTPRequestDuration = prometheus.NewHistogramVec( prometheus.HistogramOpts{ Name: "vocnet_http_request_duration_seconds", Help: "HTTP request latency in seconds", Buckets: prometheus.DefBuckets, }, []string{"method", "path"}, ) )
Functions ¶
func LoggerWithConfig ¶ added in v0.3.0
func LoggerWithConfig(cfg *config.Config) (connect.UnaryInterceptorFunc, error)
LoggerWithConfig creates a logger interceptor with configuration support
func MetricsHandler ¶ added in v0.8.0
MetricsHandler returns an http.Handler for the /metrics endpoint.
func NewAccessLogger ¶ added in v0.3.0
NewAccessLogger creates a slog logger for access logs with file output support
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents the application server
func NewServer ¶
func NewServer(cfg *config.Config, logger *slog.Logger, dictSvc dictv1connect.DictServiceHandler, lemmaSvc dictv1connect.LemmaServiceHandler, pipelineSvc pipelinev1connect.PipelineServiceHandler) (*Server, error)
NewServer creates a new server instance from pre-wired dependencies.
func (*Server) RegisterMetricsHandler ¶ added in v0.8.0
RegisterMetricsHandler registers the metrics endpoint.
Click to show internal directories.
Click to hide internal directories.