add support for repo deleted event also

by having another interface RepositoryRemover that is implemented by
registry instance and is injected in app context for event tracking

Signed-off-by: Manish Tomar <manish.tomar@docker.com>
This commit is contained in:
Manish Tomar
2018-08-02 22:58:52 -07:00
parent 0d8f4ac7b8
commit 328069bb4d
7 changed files with 76 additions and 7 deletions

View File

@@ -23,6 +23,7 @@ type registry struct {
schema1SigningKey libtrust.PrivateKey
blobDescriptorServiceFactory distribution.BlobDescriptorServiceFactory
manifestURLs manifestURLs
driver storagedriver.StorageDriver
}
// manifestURLs holds regular expressions for controlling manifest URL whitelisting
@@ -133,6 +134,7 @@ func NewRegistry(ctx context.Context, driver storagedriver.StorageDriver, option
},
statter: statter,
resumableDigestEnabled: true,
driver: driver,
}
for _, option := range options {