Commit Graph

9 Commits

Author SHA1 Message Date
Simon Ser
3a7dee8128 Introduce a database package 2022-05-09 15:08:04 +02:00
Simon Ser
0b6b687d70 msgstore_memory: add comment about Append dropping messages 2021-11-03 18:25:39 +01:00
Simon Ser
ce69f00e3f msgstore: add context to messageStore methods
This allows setting a hard timeout.
2021-11-03 18:21:05 +01:00
Simon Ser
2b4f0a870f msgstore: take Network as arg instead of network
The message stores don't need to access the internal network
struct, they just need network metadata such as ID and name.

This can ease moving message stores into a separate package in the
future.
2021-11-03 16:37:01 +01:00
delthas
03f8972305 Add support for draft/event-playback 2021-11-03 15:17:16 +01:00
Simon Ser
f6875521ea Check message stores implement expected interfaces 2021-05-18 14:19:34 +02:00
Simon Ser
5b4469fcb7 Use BARE for internal message IDs
This allows to have shorter and more future-proof IDs. This also
guarantees the IDs will only use reasonable ASCII characters (no
spaces), removing the need to encode them for PING/PONG tokens.
2021-03-31 17:57:24 +02:00
Simon Ser
5ea69fe54c
go fmt 2021-01-10 22:48:58 +01:00
Simon Ser
1110f39227
Add in-memory message store
Uses an in-memory ring buffer.

Closes: https://todo.sr.ht/~emersion/soju/96
2021-01-04 17:18:30 +01:00