fix compile error
[platform/upstream/docker-engine.git] / plugin / defs.go
1 package plugin
2
3 import (
4         "sync"
5
6         "github.com/docker/docker/pkg/plugins"
7         "github.com/docker/docker/plugin/v2"
8 )
9
10 // Store manages the plugin inventory in memory and on-disk
11 type Store struct {
12         sync.RWMutex
13         plugins map[string]*v2.Plugin
14         /* handlers are necessary for transition path of legacy plugins
15          * to the new model. Legacy plugins use Handle() for registering an
16          * activation callback.*/
17         handlers map[string][]func(string, *plugins.Client)
18 }
19
20 // NewStore creates a Store.
21 func NewStore() *Store {
22         return &Store{
23                 plugins:  make(map[string]*v2.Plugin),
24                 handlers: make(map[string][]func(string, *plugins.Client)),
25         }
26 }