MCPcopy
hub / github.com/mudler/LocalAI / httpClient

Method httpClient

core/cli/workerregistry/client.go:40–45  ·  view source on GitHub ↗

httpClient returns the shared HTTP client, initializing it on first use.

()

Source from the content-addressed store, hash-verified

38
39// httpClient returns the shared HTTP client, initializing it on first use.
40func (c *RegistrationClient) httpClient() *http.Client {
41 c.clientOnce.Do(func() {
42 c.client = httpclient.NewWithTimeout(c.httpTimeout())
43 })
44 return c.client
45}
46
47// baseURL returns FrontendURL with any trailing slash stripped.
48func (c *RegistrationClient) baseURL() string {

Callers 5

RegisterFullMethod · 0.95
HeartbeatMethod · 0.95
DrainMethod · 0.95
WaitForDrainMethod · 0.95
DeregisterMethod · 0.95

Calls 2

httpTimeoutMethod · 0.95
NewWithTimeoutFunction · 0.92

Tested by

no test coverage detected