0a29b59e14
Endpoints are now created at applications startup time, using notification configuration. The instances are then added to a Broadcaster instance, which becomes the main event sink for the application. At request time, an event bridge is configured to listen to repository method calls. The actor and source of the eventBridge are created from the requeest context and application, respectively. The result is notifications are dispatched with calls to the context's Repository instance and are queued to each endpoint via the broadcaster. This commit also adds the concept of a RequestID and App.InstanceID. The request id uniquely identifies each request and the InstanceID uniquely identifies a run of the registry. These identifiers can be used in the future to correlate log messages with generated events to support rich debugging. The fields of the app were slightly reorganized for clarity and a few horrid util functions have been removed. Signed-off-by: Stephen J Day <stephen.day@docker.com>
26 lines
633 B
YAML
26 lines
633 B
YAML
version: 0.1
|
|
loglevel: debug
|
|
storage:
|
|
filesystem:
|
|
rootdirectory: /tmp/registry-dev
|
|
http:
|
|
addr: :5000
|
|
secret: asecretforlocaldevelopment
|
|
debug:
|
|
addr: localhost:5001
|
|
notifications:
|
|
endpoints:
|
|
- name: local-8082
|
|
url: http://localhost:5003/callback
|
|
headers:
|
|
Authorization: [Bearer <an example token>]
|
|
timeout: 1s
|
|
threshold: 10
|
|
backoff: 1s
|
|
disabled: true
|
|
- name: local-8083
|
|
url: http://localhost:8083/callback
|
|
timeout: 1s
|
|
threshold: 10
|
|
backoff: 1s
|
|
disabled: true
|