mirror of
https://github.com/matrix-org/dendrite
synced 2024-11-10 20:01:15 +01:00
Created Component Design (markdown)
parent
8410ea72d4
commit
4b7475414d
1 changed files with 7 additions and 0 deletions
7
Component-Design.md
Normal file
7
Component-Design.md
Normal file
|
@ -0,0 +1,7 @@
|
|||
New components must be placed in a directory under https://github.com/matrix-org/dendrite/tree/master/src/github.com/matrix-org/dendrite. They must produce at least one binary file and be documented with a README at the top-level of its directory.
|
||||
|
||||
New components may read from or write to Kafka logs. The expected input/output structs must be put in an `api` package. New components may also expose **internal** HTTP APIs. These APIs must also be put in the `api` package. Together, this forms the API for the component which other components can make use of.
|
||||
|
||||
New components can share types/structs between each other by putting them inside https://github.com/matrix-org/dendrite/tree/master/src/github.com/matrix-org/dendrite/common. Be sparing about this: do not prematurely add code "just-in-case".
|
||||
|
||||
New components may want to read or write to a database. This database should be Postgres 9.5+ unless there is an agreed upon reason not to. SQL statements should exist in `.go` files under a `storage` package. Each table should correspond directly to one `*_table.go` file, unless there is a compelling reason not to (e.g 2 very tightly coupled tables where the statements don't makes sense without the context of the other table).
|
Loading…
Reference in a new issue