MCPcopy
hub / github.com/caddyserver/caddy / InitServer

Method InitServer

caddytest/caddytest.go:118–127  ·  view source on GitHub ↗

InitServer this will configure the server with a configurion of a specific type. The configType must be either "json" or the adapter type.

(rawConfig string, configType string)

Source from the content-addressed store, hash-verified

116// InitServer this will configure the server with a configurion of a specific
117// type. The configType must be either "json" or the adapter type.
118func (tc *Tester) InitServer(rawConfig string, configType string) {
119 if err := tc.initServer(rawConfig, configType); err != nil {
120 tc.t.Logf("failed to load config: %s", err)
121 tc.t.Fail()
122 }
123 if err := tc.ensureConfigRunning(rawConfig, configType); err != nil {
124 tc.t.Logf("failed ensuring config is running: %s", err)
125 tc.t.Fail()
126 }
127}
128
129// InitServer this will configure the server with a configurion of a specific
130// type. The configType must be either "json" or the adapter type.

Calls 2

initServerMethod · 0.95
ensureConfigRunningMethod · 0.95