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

Method Serve

core/host/task.go:112–125  ·  view source on GitHub ↗

Serve can (re)run the server with the latest known configuration.

()

Source from the content-addressed store, hash-verified

110
111// Serve can (re)run the server with the latest known configuration.
112func (h TaskHost) Serve() error {
113 // the underline server's serve, using the "latest known" listener from the supervisor.
114 l, err := h.Supervisor.newListener()
115 if err != nil {
116 return err
117 }
118
119 // if http.serverclosed ignore the error, it will have this error
120 // from the previous close
121 if err := h.Supervisor.Server.Serve(l); !errors.Is(err, http.ErrServerClosed) {
122 return err
123 }
124 return nil
125}
126
127// HostURL returns the listening full url (scheme+host)
128// based on the supervisor's server's address.

Callers 4

ListenerFunction · 0.45
mainFunction · 0.45
testSupervisorFunction · 0.45
TestProxyFunction · 0.45

Calls 2

newListenerMethod · 0.80
IsMethod · 0.45

Tested by 2

testSupervisorFunction · 0.36
TestProxyFunction · 0.36