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

Function Load

pkg/distributedhdr/distributedhdr.go:86–92  ·  view source on GitHub ↗

Load returns the node ID most recently stamped into the holder, or "" if nothing has been stamped. Intended for the response writer wrapper's first-byte hook.

(h *atomic.Value)

Source from the content-addressed store, hash-verified

84// "" if nothing has been stamped. Intended for the response writer
85// wrapper's first-byte hook.
86func Load(h *atomic.Value) string {
87 if h == nil {
88 return ""
89 }
90 v, _ := h.Load().(string)
91 return v
92}
93
94// Inherit copies the holder reference from src into dst when present.
95// Used at request-handling seams where the request context is replaced

Callers 4

ExposeNodeHeaderFunction · 0.92

Calls 1

LoadMethod · 0.65

Tested by

no test coverage detected