mirror of
https://github.com/actix/actix-website
synced 2025-02-17 10:13:31 +01:00
Fix nextup links (#153)
* Fix page weights * Fix nextup link generation
This commit is contained in:
parent
8c8de9f7fb
commit
69145efc1e
@ -1,13 +1,13 @@
|
|||||||
---
|
---
|
||||||
title: Connection Lifecycle
|
title: Connection Lifecycle
|
||||||
menu: docs_architecture
|
menu: docs_architecture
|
||||||
weight: 20
|
weight: 1030
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
# Architecture overview
|
# Architecture overview
|
||||||
|
|
||||||
After Server has started listening to all sockets, [`Accept`][Accept] and [`Worker`][Worker] are two main loops responsible for processing incoming client connections.
|
After Server has started listening to all sockets, [`Accept`][Accept] and [`Worker`][Worker] are two main loops responsible for processing incoming client connections.
|
||||||
|
|
||||||
Once connection accepted Application level protocol processing happens in a protocol specific [`Dispatcher`][Dispatcher] loop spawned from [`Worker`][Worker].
|
Once connection accepted Application level protocol processing happens in a protocol specific [`Dispatcher`][Dispatcher] loop spawned from [`Worker`][Worker].
|
||||||
|
|
||||||
@ -19,19 +19,19 @@ Once connection accepted Application level protocol processing happens in a prot
|
|||||||
|
|
||||||
![](/img/diagrams/connection_accept.svg)
|
![](/img/diagrams/connection_accept.svg)
|
||||||
|
|
||||||
Most of code implementation resides in [`actix-server`][server] crate for struct [`Accept`][Accept].
|
Most of code implementation resides in [`actix-server`][server] crate for struct [`Accept`][Accept].
|
||||||
|
|
||||||
## Worker loop in more detail
|
## Worker loop in more detail
|
||||||
|
|
||||||
![](/img/diagrams/connection_worker.svg)
|
![](/img/diagrams/connection_worker.svg)
|
||||||
|
|
||||||
Most of code implementation resides in [`actix-server`][server] crate for struct [`Worker`][Worker].
|
Most of code implementation resides in [`actix-server`][server] crate for struct [`Worker`][Worker].
|
||||||
|
|
||||||
## Request loop roughly
|
## Request loop roughly
|
||||||
|
|
||||||
![](/img/diagrams/connection_request.svg)
|
![](/img/diagrams/connection_request.svg)
|
||||||
|
|
||||||
Most of code implementation for request loop resides in [`actix-web`][web] and [`actix-http`][http] crates.
|
Most of code implementation for request loop resides in [`actix-web`][web] and [`actix-http`][http] crates.
|
||||||
|
|
||||||
|
|
||||||
[server]: https://crates.io/crates/actix-server
|
[server]: https://crates.io/crates/actix-server
|
||||||
@ -39,4 +39,4 @@ Most of code implementation for request loop resides in [`actix-web`][web] and [
|
|||||||
[http]: https://crates.io/crates/actix-http
|
[http]: https://crates.io/crates/actix-http
|
||||||
[Accept]: https://github.com/actix/actix-net/blob/master/actix-server/src/accept.rs
|
[Accept]: https://github.com/actix/actix-net/blob/master/actix-server/src/accept.rs
|
||||||
[Worker]: https://github.com/actix/actix-net/blob/master/actix-server/src/worker.rs
|
[Worker]: https://github.com/actix/actix-net/blob/master/actix-server/src/worker.rs
|
||||||
[Dispatcher]: https://github.com/actix/actix-web/blob/master/actix-http/src/h1/dispatcher.rs
|
[Dispatcher]: https://github.com/actix/actix-web/blob/master/actix-http/src/h1/dispatcher.rs
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
title: Http Server Initialization
|
title: Http Server Initialization
|
||||||
menu: docs_architecture
|
menu: docs_architecture
|
||||||
weight: 10
|
weight: 1020
|
||||||
---
|
---
|
||||||
|
|
||||||
## Architecture overview
|
## Architecture overview
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
title: Testing
|
title: Testing
|
||||||
menu: docs_advanced
|
menu: docs_advanced
|
||||||
weight: 210
|
weight: 215
|
||||||
---
|
---
|
||||||
|
|
||||||
# Testing
|
# Testing
|
||||||
|
@ -103,10 +103,18 @@
|
|||||||
<div class="github-edit">
|
<div class="github-edit">
|
||||||
<a class="fa fa-github" href="https://github.com/actix/actix-website/tree/master/content/{{ .File.Path }}"> Edit on GitHub</a>
|
<a class="fa fa-github" href="https://github.com/actix/actix-website/tree/master/content/{{ .File.Path }}"> Edit on GitHub</a>
|
||||||
</div>
|
</div>
|
||||||
<!-- Yes, we have to use *Prev* to get the next content, because the
|
|
||||||
weights are sorted inversely to how they are actually displayed... -->
|
{{ if eq (len .Pages) 0 }}
|
||||||
{{ with .PrevInSection }}<div class="actix-next"><b>Next up</b>: <a href = {{ .URL }}>{{ end }}
|
{{ .Scratch.Set "Docs" .Parent.Pages.ByWeight }}
|
||||||
{{ with .PrevInSection }} {{ .Title }}</a></div>{{ end }}
|
{{ else }}
|
||||||
|
{{ .Scratch.Set "Docs" .Pages.ByWeight }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ .Scratch.Set "CurrentWeight" .Weight }}
|
||||||
|
|
||||||
|
{{ range first 1 (where (.Scratch.Get "Docs") ".Weight" ">" (.Scratch.Get "CurrentWeight")) }}
|
||||||
|
<div class="actix-next"><b>Next up</b>: <a href = {{ .URL }}>{{ .Title }}</a></div>
|
||||||
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user