remove eventloop type docs, improve service docs

This commit is contained in:
Joannis Orlandos 2017-12-01 13:34:04 +01:00
parent e5b74d5b42
commit d5f685e246
4 changed files with 8 additions and 13 deletions

View File

@ -4,7 +4,6 @@ Async is a library revolving around two main concepts:
- [Promises and Futures](futures.md)
- [Streams](streams.md)
- [Workers](worker.md)
Together they form the foundation of Vapor 3's data flow.

View File

@ -1,11 +0,0 @@
# Worker
Workers are any type that keep track of the current [EventLoop](../concepts/async.md).
Worker is a simple protocol and can be conformed to if the context can return (by means of a computed property) or contain an EventLoop.
There are three primary Workers that you can use to access the `EventLoop` and it's queue or context.
- [Request](../http/request.md) can be used, usually from within a [Route](../routing/basics.md)
- [EventLoop](../concepts/async.md) is itself a worker to ensure the extensions and consumers of Worker can be used, too.
- `DispatchQueue` is a worker that will return a *new and clean* EventLoop based on the current DispatchQueue

View File

@ -74,3 +74,11 @@ If we set Vapor's environment to development we'll get an instance of `VerboseLo
let logger = container.make(Logger.self)
logger.log("hello", level: .verbose) // only logs on development
```
## Containers
Containers are types that contain the current context. They have access to the services, environment, configuration and [EventLoop](async.md) and can use these to `.make()` new service types.
The factory method registered to a service will get access to the container's Context during the creation of type.
There are a few containers that are often accessed, the primary `Container` type for Vapor users is [`Request`](../http/request.md), which can be accessed in every [`Route`](../routing/route.md).

View File

@ -29,7 +29,6 @@ pages:
- 'Package': 'async/package.md'
- 'Futures': 'async/futures.md'
- 'Streams': 'async/streams.md'
- 'Worker': 'async/worker.md'
- 'HTTP':
- 'Package': 'http/package.md'
- 'Body': 'http/body.md'