MCPcopy Create free account
hub / github.com/kataras/iris / Server

Function Server

iris.go:849–855  ·  view source on GitHub ↗

Server can be used as an argument for the `Run` method. It can start a server with a *http.Server. Second argument is optional, it accepts one or more `func(*host.Configurator)` that are being executed on that specific host that this function will create to start the server. Via host configurators

(srv *http.Server, hostConfigs ...host.Configurator)

Source from the content-addressed store, hash-verified

847//
848// See `Run` for more.
849func Server(srv *http.Server, hostConfigs ...host.Configurator) Runner {
850 return func(app *Application) error {
851 return app.NewHost(srv).
852 Configure(hostConfigs...).
853 ListenAndServe()
854 }
855}
856
857// Addr can be used as an argument for the `Run` method.
858// It accepts a host address which is used to build a server

Callers

nothing calls this directly

Calls 3

ListenAndServeMethod · 0.80
NewHostMethod · 0.80
ConfigureMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…