diff --git a/server/server.go b/server/server.go index aac056fc..2ed640b4 100644 --- a/server/server.go +++ b/server/server.go @@ -58,7 +58,7 @@ type Server struct { storageImageServer storage.ImageServer storageRuntimeServer storage.RuntimeServer updateLock sync.RWMutex - state state.Store + state state.RuntimeStateStorer netPlugin ocicni.CNIPlugin hostportManager hostport.HostPortManager imageContext *types.SystemContext diff --git a/server/state/in_memory_state.go b/server/state/in_memory_state.go index 21c914de..4c93e686 100644 --- a/server/state/in_memory_state.go +++ b/server/state/in_memory_state.go @@ -26,7 +26,7 @@ type InMemoryState struct { } // NewInMemoryState creates a new, empty server state -func NewInMemoryState() Store { +func NewInMemoryState() RuntimeStateStorer { state := new(InMemoryState) state.sandboxes = make(map[string]*sandbox.Sandbox) state.containers = oci.NewMemoryStore() diff --git a/server/state/state_store.go b/server/state/state_store.go index f96ce0de..5a7f7683 100644 --- a/server/state/state_store.go +++ b/server/state/state_store.go @@ -5,8 +5,8 @@ import ( "github.com/kubernetes-incubator/cri-o/server/sandbox" ) -// Store stores the state of the CRI-O server, including active pods and containers -type Store interface { +// RuntimeStateStorer stores the state of the CRI-O server, including active pods and containers +type RuntimeStateStorer interface { AddSandbox(s *sandbox.Sandbox) error HasSandbox(id string) bool DeleteSandbox(id string) error