Merge pull request #18888 from calavera/event_types

Event all the things!
Upstream-commit: 723be0a3325799fd6b2a6b689af54f5a07edf992
Component: engine
This commit is contained in:
David Calavera
2016-01-04 13:07:33 -08:00
40 changed files with 1315 additions and 562 deletions

View File

@ -8,7 +8,6 @@ import (
"github.com/Sirupsen/logrus"
"github.com/docker/docker/api"
"github.com/docker/docker/api/types"
"github.com/docker/docker/daemon/events"
"github.com/docker/docker/distribution/metadata"
"github.com/docker/docker/distribution/xfer"
"github.com/docker/docker/image"
@ -32,8 +31,8 @@ type ImagePullConfig struct {
// RegistryService is the registry service to use for TLS configuration
// and endpoint lookup.
RegistryService *registry.Service
// EventsService is the events service to use for logging.
EventsService *events.Events
// ImageEventLogger notifies events for a given image
ImageEventLogger func(id, name, action string)
// MetadataStore is the storage backend for distribution-specific
// metadata.
MetadataStore metadata.Store
@ -161,7 +160,7 @@ func Pull(ctx context.Context, ref reference.Named, imagePullConfig *ImagePullCo
}
}
imagePullConfig.EventsService.Log("pull", ref.String(), "")
imagePullConfig.ImageEventLogger(ref.String(), repoInfo.Name(), "pull")
return nil
}