cmd/containerd: remove cli.Context dependence for content.Store
We've moved to using the config, directly. This removes the argument and gets rid of a few extra lines of code. Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
parent
8ae905b92b
commit
baa307cd4b
1 changed files with 3 additions and 4 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue