Allow Manifest Service to be configured with function arguments
Signed-off-by: Richard Scothern <richard.scothern@gmail.com>
This commit is contained in:
parent
2b88cb9413
commit
f331da2daa
10 changed files with 118 additions and 48 deletions
|
@ -51,11 +51,15 @@ func Listen(repo distribution.Repository, listener Listener) distribution.Reposi
|
|||
}
|
||||
}
|
||||
|
||||
func (rl *repositoryListener) Manifests() distribution.ManifestService {
|
||||
return &manifestServiceListener{
|
||||
ManifestService: rl.Repository.Manifests(),
|
||||
parent: rl,
|
||||
func (rl *repositoryListener) Manifests(ctx context.Context, options ...distribution.ManifestServiceOption) (distribution.ManifestService, error) {
|
||||
manifests, err := rl.Repository.Manifests(ctx, options...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &manifestServiceListener{
|
||||
ManifestService: manifests,
|
||||
parent: rl,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (rl *repositoryListener) Blobs(ctx context.Context) distribution.BlobStore {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue