forked from TrueCloudLab/distribution
The toolkit to pack, ship, store, and deliver container content
22c9f45598
This changeset defines the application structure to be used for the http side of the new registry. The main components are the App and Context structs. The App context is instance global and manages global configuration and resources. Context contains request-specific resources that may be created as a by-product of an in-flight request. To latently construct per-request handlers and leverage gorilla/mux, a dispatch structure has been propped up next to the main handler flow. Without this, a router and all handlers need to be constructed on every request. By constructing handlers on each request, we ensure thread isolation and can carefully control the security context of in-flight requests. There are unit tests covering this functionality. |
||
---|---|---|
cmd | ||
configuration | ||
open-design | ||
storagedriver | ||
.travis.yml | ||
app.go | ||
app_test.go | ||
context.go | ||
CONTRIBUTING.md | ||
errors.go | ||
errors_test.go | ||
helpers.go | ||
images.go | ||
layer.go | ||
layerupload.go | ||
LICENSE | ||
MAINTAINERS | ||
routes.go | ||
routes_test.go | ||
tags.go | ||
util.go |