diff options
author | ruben <code@rbn.im> | 2019-05-21 22:56:55 +0200 |
---|---|---|
committer | Brendan Abolivier <babolivier@matrix.org> | 2019-05-21 21:56:55 +0100 |
commit | 74827428bd3e11faab65f12204449c1b9469b0ae (patch) | |
tree | 0decafa542436a0667ed2d3e3cfd4df0f03de1e5 /clientapi/README.md | |
parent | 4d588f7008afe5600219ac0930c2eee2de5c447b (diff) |
use go module for dependencies (#594)
Diffstat (limited to 'clientapi/README.md')
-rw-r--r-- | clientapi/README.md | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clientapi/README.md b/clientapi/README.md new file mode 100644 index 00000000..6d4a9dce --- /dev/null +++ b/clientapi/README.md @@ -0,0 +1,11 @@ +This component roughly corresponds to "Client Room Send" and "Client Sync" on [the WIRING diagram](https://github.com/matrix-org/dendrite/blob/master/WIRING.md). +This component produces multiple binaries. + +## Internals + +- HTTP routing is done using `gorilla/mux` and the routing paths are in the `routing` package. + +### Writers +- Each HTTP "write operation" (`/createRoom`, `/rooms/$room_id/send/$type`, etc) is contained entirely to a single file in the `writers` package. +- This file contains the request and response `struct` definitions, as well as a `Validate() bool` function to validate incoming requests. +- The entry point for each write operation is a stand-alone function as this makes testing easier. All dependencies should be injected into this function, including server keys/name, etc. |