Add snapshot plugin type
Update existing snapshot drivers to register as plugins. Load snapshot driver at containerd startup. Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
This commit is contained in:
parent
f06db40baf
commit
a4247e2aa9
6 changed files with 91 additions and 15 deletions
|
@ -6,6 +6,7 @@ import (
|
|||
|
||||
"github.com/docker/containerd"
|
||||
"github.com/docker/containerd/content"
|
||||
"github.com/docker/containerd/snapshot"
|
||||
|
||||
"golang.org/x/net/context"
|
||||
"google.golang.org/grpc"
|
||||
|
@ -16,6 +17,7 @@ type PluginType int
|
|||
const (
|
||||
RuntimePlugin PluginType = iota + 1
|
||||
GRPCPlugin
|
||||
SnapshotPlugin
|
||||
)
|
||||
|
||||
type Registration struct {
|
||||
|
@ -25,12 +27,13 @@ type Registration struct {
|
|||
}
|
||||
|
||||
type InitContext struct {
|
||||
Root string
|
||||
State string
|
||||
Runtimes map[string]containerd.Runtime
|
||||
Store *content.Store
|
||||
Config interface{}
|
||||
Context context.Context
|
||||
Root string
|
||||
State string
|
||||
Runtimes map[string]containerd.Runtime
|
||||
Store *content.Store
|
||||
Snapshotter snapshot.Snapshotter
|
||||
Config interface{}
|
||||
Context context.Context
|
||||
}
|
||||
|
||||
type Service interface {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue