github.com/vieux/docker@v0.6.3-0.20161004191708-e097c2a938c7/plugin/getter/interface.go (about)

     1  package getter
     2  
     3  import "github.com/docker/docker/pkg/plugins"
     4  
     5  const (
     6  	// LOOKUP doesn't update RefCount
     7  	LOOKUP = 0
     8  	// CREATE increments RefCount
     9  	CREATE = 1
    10  	// REMOVE decrements RefCount
    11  	REMOVE = -1
    12  )
    13  
    14  // CompatPlugin is a abstraction to handle both v2(new) and v1(legacy) plugins.
    15  type CompatPlugin interface {
    16  	Client() *plugins.Client
    17  	Name() string
    18  	IsV1() bool
    19  }
    20  
    21  // PluginGetter is the interface implemented by Store
    22  type PluginGetter interface {
    23  	Get(name, capability string, mode int) (CompatPlugin, error)
    24  	GetAllByCap(capability string) ([]CompatPlugin, error)
    25  	Handle(capability string, callback func(string, *plugins.Client))
    26  }