Rename state.Store to something more greppable

Signed-off-by: Matthew Heon <mheon@redhat.com>
This commit is contained in:
Matthew Heon 2017-04-21 11:03:21 -04:00
parent 16fb71fea0
commit d435433971
3 changed files with 4 additions and 4 deletions

View file

@ -58,7 +58,7 @@ type Server struct {
storageImageServer storage.ImageServer storageImageServer storage.ImageServer
storageRuntimeServer storage.RuntimeServer storageRuntimeServer storage.RuntimeServer
updateLock sync.RWMutex updateLock sync.RWMutex
state state.Store state state.RuntimeStateStorer
netPlugin ocicni.CNIPlugin netPlugin ocicni.CNIPlugin
hostportManager hostport.HostPortManager hostportManager hostport.HostPortManager
imageContext *types.SystemContext imageContext *types.SystemContext

View file

@ -26,7 +26,7 @@ type InMemoryState struct {
} }
// NewInMemoryState creates a new, empty server state // NewInMemoryState creates a new, empty server state
func NewInMemoryState() Store { func NewInMemoryState() RuntimeStateStorer {
state := new(InMemoryState) state := new(InMemoryState)
state.sandboxes = make(map[string]*sandbox.Sandbox) state.sandboxes = make(map[string]*sandbox.Sandbox)
state.containers = oci.NewMemoryStore() state.containers = oci.NewMemoryStore()

View file

@ -5,8 +5,8 @@ import (
"github.com/kubernetes-incubator/cri-o/server/sandbox" "github.com/kubernetes-incubator/cri-o/server/sandbox"
) )
// Store stores the state of the CRI-O server, including active pods and containers // RuntimeStateStorer stores the state of the CRI-O server, including active pods and containers
type Store interface { type RuntimeStateStorer interface {
AddSandbox(s *sandbox.Sandbox) error AddSandbox(s *sandbox.Sandbox) error
HasSandbox(id string) bool HasSandbox(id string) bool
DeleteSandbox(id string) error DeleteSandbox(id string) error