MCPcopy
hub / github.com/grafana/dskit / Server

Struct Server

server/server.go:273–285  ·  view source on GitHub ↗

Server wraps a HTTP and gRPC server, and some common initialization. Servers will be automatically instrumented for Prometheus metrics.

Source from the content-addressed store, hash-verified

271//
272// Servers will be automatically instrumented for Prometheus metrics.
273type Server struct {
274 cfg Config
275 handler SignalHandler
276 grpcListener net.Listener
277 httpListener net.Listener
278
279 HTTP *mux.Router
280 HTTPServer *http.Server
281 GRPC *grpc.Server
282 Log gokit_log.Logger
283 Registerer prometheus.Registerer
284 Gatherer prometheus.Gatherer
285}
286
287// New makes a new Server. It will panic if the metrics cannot be registered.
288func New(cfg Config) (*Server, error) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected