Resurrect State directory

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
Kenfe-Mickael Laventure
2017-08-03 09:12:58 -07:00
parent 0fa76584f8
commit 642620cae3
10 changed files with 47 additions and 13 deletions

View File

@@ -9,16 +9,18 @@ import (
"github.com/containerd/containerd/log"
)
func NewContext(ctx context.Context, plugins map[PluginType]map[string]interface{}, root, id string) *InitContext {
func NewContext(ctx context.Context, plugins map[PluginType]map[string]interface{}, root, state, id string) *InitContext {
return &InitContext{
plugins: plugins,
Root: filepath.Join(root, id),
State: filepath.Join(state, id),
Context: log.WithModule(ctx, id),
}
}
type InitContext struct {
Root string
State string
Address string
Context context.Context
Config interface{}