Fires a new Mount event when blobs are cross-repo mounted
Adds an optional "fromRepository" field to the event target Signed-off-by: Brian Bland <brian.bland@docker.com>
This commit is contained in:
parent
3a35a2d953
commit
613cfc861d
4 changed files with 31 additions and 0 deletions
|
@ -72,6 +72,15 @@ func (b *bridge) BlobPulled(repo string, desc distribution.Descriptor) error {
|
|||
return b.createBlobEventAndWrite(EventActionPull, repo, desc)
|
||||
}
|
||||
|
||||
func (b *bridge) BlobMounted(repo string, desc distribution.Descriptor, fromRepo string) error {
|
||||
event, err := b.createBlobEvent(EventActionMount, repo, desc)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
event.Target.FromRepository = fromRepo
|
||||
return b.sink.Write(*event)
|
||||
}
|
||||
|
||||
func (b *bridge) BlobDeleted(repo string, desc distribution.Descriptor) error {
|
||||
return b.createBlobEventAndWrite(EventActionDelete, repo, desc)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue