Merge pull request #555 from stevvooe/remove-cli-dependence-content-store-main

cmd/containerd: remove cli.Context dependence for content.Store
This commit is contained in:
Stephen Day 2017-02-21 16:13:10 -08:00 committed by GitHub
commit b7805198b1

View file

@ -90,17 +90,16 @@ func main() {
}
serveMetricsAPI()
contentStore, err := resolveContentStore(context)
contentStore, err := resolveContentStore()
if err != nil {
return err
}
contentService := content.NewService(contentStore)
// start the GRPC api with the execution service registered
server := newGRPCServer()
api.RegisterContainerServiceServer(server, execution.New(supervisor))
contentapi.RegisterContentServer(server, contentService)
contentapi.RegisterContentServer(server, content.NewService(contentStore))
// start the GRPC api with registered services
if err := serveGRPC(server); err != nil {
@ -204,7 +203,7 @@ func serveDebugAPI() error {
return nil
}
func resolveContentStore(context *cli.Context) (*content.Store, error) {
func resolveContentStore() (*content.Store, error) {
cp := filepath.Join(conf.Root, "content")
return content.NewStore(cp)
}