MCPcopy
hub / github.com/fagongzi/manba / CheckHTTPCode

Method CheckHTTPCode

pkg/client/server.go:38–49  ·  view source on GitHub ↗

CheckHTTPCode use a heath check

(path string, interval time.Duration, timeout time.Duration)

Source from the content-addressed store, hash-verified

36
37// CheckHTTPCode use a heath check
38func (sb *ServerBuilder) CheckHTTPCode(path string, interval time.Duration, timeout time.Duration) *ServerBuilder {
39 if sb.value.HeathCheck == nil {
40 sb.value.HeathCheck = &metapb.HeathCheck{}
41
42 }
43
44 sb.value.HeathCheck.Path = path
45 sb.value.HeathCheck.Body = ""
46 sb.value.HeathCheck.CheckInterval = int64(interval)
47 sb.value.HeathCheck.Timeout = int64(timeout)
48 return sb
49}
50
51// CheckHTTPBody use a heath check
52func (sb *ServerBuilder) CheckHTTPBody(path, body string, interval time.Duration, timeout time.Duration) *ServerBuilder {

Callers 1

createServerFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected