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

Function NewServer

httpgrpc/server/server.go:69–71  ·  view source on GitHub ↗

NewServer makes a new Server.

(handler http.Handler, opts ...Option)

Source from the content-addressed store, hash-verified

67
68// NewServer makes a new Server.
69func NewServer(handler http.Handler, opts ...Option) *Server {
70 return applyServerOptions(&Server{handler: handler}, opts...)
71}
72
73// Handle implements HTTPServer.
74func (s Server) Handle(ctx context.Context, r *httpgrpc.HTTPRequest) (*httpgrpc.HTTPResponse, error) {

Calls 1

applyServerOptionsFunction · 0.85

Tested by 6

newTestServerFunction · 0.68