MCPcopy Create free account
hub / github.com/docker/docker-agent / newPersistenceObserver

Function newPersistenceObserver

pkg/runtime/persistence_observer.go:50–55  ·  view source on GitHub ↗

newPersistenceObserver returns an observer that persists to store, or nil when store is nil so the constructor can call [WithEventObserver] unconditionally without a guard.

(store session.Store)

Source from the content-addressed store, hash-verified

48// nil when store is nil so the constructor can call [WithEventObserver]
49// unconditionally without a guard.
50func newPersistenceObserver(store session.Store) *PersistenceObserver {
51 if store == nil {
52 return nil
53 }
54 return &PersistenceObserver{store: store}
55}
56
57// OnRunStart persists the session row before the run loop starts.
58// Sub-sessions skip this: the parent session's store absorbs them via

Calls

no outgoing calls