storage/driver: plumb contexts into factories

...and driver constructors when applicable.

Signed-off-by: Cory Snider <csnider@mirantis.com>
This commit is contained in:
Cory Snider
2023-10-27 17:33:55 -04:00
parent 6c694cbcf6
commit b45b6d18b8
11 changed files with 29 additions and 29 deletions

View File

@@ -116,7 +116,7 @@ func NewApp(ctx context.Context, config *configuration.Configuration) *App {
storageParams["useragent"] = fmt.Sprintf("distribution/%s %s", version.Version, runtime.Version())
var err error
app.driver, err = factory.Create(config.Storage.Type(), storageParams)
app.driver, err = factory.Create(app, config.Storage.Type(), storageParams)
if err != nil {
// TODO(stevvooe): Move the creation of a service into a protected
// method, where this is created lazily. Its status can be queried via