registry/storage
Stephen J Day 9f0c8d6616 Implement notification endpoint webhook dispatch
This changeset implements webhook notification endpoints for dispatching
registry events. Repository instances can be decorated by a listener that
converts calls into context-aware events, using a bridge. Events generated in
the bridge are written to a sink. Implementations of sink include a broadcast
and endpoint sink which can be used to configure event dispatch. Endpoints
represent a webhook notification target, with queueing and retries built in.
They can be added to a Broadcaster, which is a simple sink that writes a block
of events to several sinks, to provide a complete dispatch mechanism.

The main caveat to the current approach is that all unsent notifications are
inmemory. Best effort is made to ensure that notifications are not dropped, to
the point where queues may back up on faulty endpoints. If the endpoint is
fixed, the events will be retried and all messages will go through.

Internally, this functionality is all made up of Sink objects. The queuing
functionality is implemented with an eventQueue sink and retries are
implemented with retryingSink. Replacing the inmemory queuing with something
persistent should be as simple as replacing broadcaster with a remote queue and
that sets up the sinks to be local workers listening to that remote queue.

Metrics are kept for each endpoint and exported via expvar. This may not be a
permanent appraoch but should provide enough information for troubleshooting
notification problems.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2015-02-03 13:30:20 -08:00
..
decorator Implement registry decorator toolkit 2015-01-21 10:46:20 -08:00
notifications Implement notification endpoint webhook dispatch 2015-02-03 13:30:20 -08:00
blobstore.go Refactor storage API to be registry oriented 2015-01-16 18:33:21 -08:00
cloudfrontlayerhandler.go Updates goamz dependency from crowdmob->AdRoll 2015-02-02 11:03:20 -08:00
delegatelayerhandler.go DelegateLayerHandler now uses http method in url generation 2015-01-15 18:15:26 -08:00
doc.go Lots of various golint fixes 2014-11-17 15:46:06 -08:00
filereader.go Handle empty blob files more appropriately 2015-02-02 13:01:49 -08:00
filereader_test.go Handle empty blob files more appropriately 2015-02-02 13:01:49 -08:00
filewriter.go Handle empty blob files more appropriately 2015-02-02 13:01:49 -08:00
filewriter_test.go Implement a remote file writer for use with StorageDriver 2015-01-09 14:49:06 -08:00
layer.go Handle empty blob files more appropriately 2015-02-02 13:01:49 -08:00
layer_test.go Handle empty blob files more appropriately 2015-02-02 13:01:49 -08:00
layerhandler.go Adds support for content redirects for layer downloads 2015-01-08 17:01:28 -08:00
layerreader.go Move from docker-registry to distribution 2014-12-23 17:13:02 -08:00
layerstore.go Refactor storage API to be registry oriented 2015-01-16 18:33:21 -08:00
layerupload.go Handle empty blob files more appropriately 2015-02-02 13:01:49 -08:00
manifeststore.go Add payload and signatures method to SignedManifest 2015-02-03 13:30:20 -08:00
manifeststore_test.go Refactor storage API to be registry oriented 2015-01-16 18:33:21 -08:00
paths.go Prefix non-name path components 2015-02-02 14:47:24 -08:00
paths_test.go Prefix non-name path components 2015-02-02 14:47:24 -08:00
registry.go Refactor storage API to be registry oriented 2015-01-16 18:33:21 -08:00
revisionstore.go Add payload and signatures method to SignedManifest 2015-02-03 13:30:20 -08:00
services.go Refactor storage API to be registry oriented 2015-01-16 18:33:21 -08:00
tagstore.go Refactor storage API to be registry oriented 2015-01-16 18:33:21 -08:00