Propogate tag as a functional argument into the notification system to attach

tags to manifest push and pull event notifications.

Signed-off-by: Richard Scothern <richard.scothern@gmail.com>
This commit is contained in:
Richard Scothern 2016-03-18 15:30:47 -07:00
parent ec6ac0c05e
commit afe2bdd1c5
9 changed files with 100 additions and 37 deletions

View file

@ -44,7 +44,7 @@ func TestListener(t *testing.T) {
"manifest:delete": 1,
"layer:push": 2,
"layer:pull": 2,
"layer:delete": 2, // deletes not supported for now
"layer:delete": 2,
}
if !reflect.DeepEqual(tl.ops, expectedOps) {
@ -57,13 +57,13 @@ type testListener struct {
ops map[string]int
}
func (tl *testListener) ManifestPushed(repo reference.Named, m distribution.Manifest) error {
func (tl *testListener) ManifestPushed(repo reference.Named, m distribution.Manifest, options ...distribution.ManifestServiceOption) error {
tl.ops["manifest:push"]++
return nil
}
func (tl *testListener) ManifestPulled(repo reference.Named, m distribution.Manifest) error {
func (tl *testListener) ManifestPulled(repo reference.Named, m distribution.Manifest, options ...distribution.ManifestServiceOption) error {
tl.ops["manifest:pull"]++
return nil
}