Add apps info

Matt Holt 2019-09-07 14:08:28 -06:00
parent 79798c516f
commit a90010d7cf

@ -97,7 +97,7 @@ Apps are modules which define their own top-level namespace, and which appear in
}
```
Example apps are `http` and `tls`. Their module name and namespace are the same. Guest modules use a namespace inherited from their host module. For example, HTTP handlers use the `http.handlers` namespace and TLS certificate loaders use the `tls.certificates` namespace.
Example apps are `http` and `tls`. Their module name and namespace are the same. Guest modules use a namespace inherited from their host module. For example, HTTP handlers use the `http.handlers` namespace and TLS certificate loaders use the `tls.certificates` namespace. App modules implement the `caddy.App` interface.
## Namespaces
@ -148,6 +148,7 @@ The configuration for Gadget would come in on the GadgetRaw field and then your
| Kind of module | Namespace | Interface |
| -------------- | --------- | --------- |
| Caddy app | | caddy.App |
| HTTP handler | `http.handlers` | caddyhttp.MiddlewareHandler |
| HTTP encoder | `http.encoders` | caddyhttp.Encoder |
| HTTP request matcher | `http.matchers` | caddyhttp.RequestMatcher |