Replace sync.Mutex with sync.Locker to allow different locks

Signed-off-by: Matthew Heon <mheon@redhat.com>
This commit is contained in:
Matthew Heon 2017-07-14 15:56:37 -04:00
parent 96ebf829c9
commit 4086f2bc37

View file

@ -57,7 +57,7 @@ type Server struct {
store sstorage.Store
storageImageServer storage.ImageServer
storageRuntimeServer storage.RuntimeServer
stateLock sync.Mutex
stateLock sync.Locker
updateLock sync.RWMutex
state *serverState
netPlugin ocicni.CNIPlugin
@ -589,6 +589,7 @@ func New(config *Config) (*Server, error) {
store: store,
storageImageServer: imageService,
storageRuntimeServer: storageRuntimeService,
stateLock: new(sync.Mutex),
netPlugin: netPlugin,
hostportManager: hostportManager,
config: *config,