MCPcopy Index your code
hub / github.com/opencloud-eu/opencloud / Server

Function Server

services/users/pkg/server/debug/server.go:11–27  ·  view source on GitHub ↗

Server initializes the debug service and server.

(opts ...Option)

Source from the content-addressed store, hash-verified

9
10// Server initializes the debug service and server.
11func Server(opts ...Option) (*http.Server, error) {
12 options := newOptions(opts...)
13
14 return debug.NewService(
15 debug.Logger(options.Logger),
16 debug.Name(options.Config.Service.Name),
17 debug.Version(version.GetString()),
18 debug.Address(options.Config.Debug.Addr),
19 debug.Token(options.Config.Debug.Token),
20 debug.Pprof(options.Config.Debug.Pprof),
21 debug.Zpages(options.Config.Debug.Zpages),
22 //debug.CorsAllowedOrigins(options.Config.HTTP.CORS.AllowedOrigins),
23 //debug.CorsAllowedMethods(options.Config.HTTP.CORS.AllowedMethods),
24 //debug.CorsAllowedHeaders(options.Config.HTTP.CORS.AllowedHeaders),
25 //debug.CorsAllowCredentials(options.Config.HTTP.CORS.AllowCredentials),
26 ), nil
27}

Callers 1

ServerFunction · 0.92

Calls 10

NewServiceFunction · 0.92
LoggerFunction · 0.92
NameFunction · 0.92
VersionFunction · 0.92
GetStringFunction · 0.92
AddressFunction · 0.92
TokenFunction · 0.92
PprofFunction · 0.92
ZpagesFunction · 0.92
newOptionsFunction · 0.70

Tested by

no test coverage detected