MCPcopy Create free account
hub / github.com/cloudwan/gohan / GohanServer

Function GohanServer

extension/gohanscript/lib/httpserver.go:192–206  ·  view source on GitHub ↗

GohanServer starts gohan server from configFile

(configFile string, test bool)

Source from the content-addressed store, hash-verified

190
191//GohanServer starts gohan server from configFile
192func GohanServer(configFile string, test bool) (interface{}, error) {
193 s, err := server.NewServer(configFile)
194 if err != nil {
195 return nil, err
196 }
197 if test {
198 ts := httptest.NewServer(s.Router())
199 return map[string]interface{}{
200 "server": ts,
201 "queue": s.Queue(),
202 }, nil
203 }
204 s.Start()
205 return nil, nil
206}

Callers

nothing calls this directly

Calls 3

RouterMethod · 0.95
QueueMethod · 0.95
StartMethod · 0.95

Tested by

no test coverage detected