MCPcopy
hub / github.com/docker/docker-agent / SnapshotModelOverride

Method SnapshotModelOverride

pkg/agent/agent.go:254–256  ·  view source on GitHub ↗

SnapshotModelOverride captures the agent's current model override. The returned snapshot is opaque; pass it to RestoreModelOverride later to restore the captured value.

()

Source from the content-addressed store, hash-verified

252// returned snapshot is opaque; pass it to RestoreModelOverride later to
253// restore the captured value.
254func (a *Agent) SnapshotModelOverride() ModelOverrideSnapshot {
255 return ModelOverrideSnapshot{ptr: a.modelOverrides.Load()}
256}
257
258// RestoreModelOverride atomically restores the override to the value
259// captured by `prev`, but only if the current override is still the one

Calls 1

LoadMethod · 0.80