Initial work on implementing postgresql storage

Generated placeholders to use raw sql queries with `pgx` driver
and implemented put/del peer and announce functions

* inline GCAware and StatisticsAware to PeerStorage
* fix redis doc configuration sample
* update dependencies
This commit is contained in:
Lawrence, Rendall
2022-06-15 21:42:43 +03:00
parent 615bcb2050
commit 8430e1f31f
8 changed files with 580 additions and 62 deletions

View File

@@ -35,8 +35,11 @@ mochi:
# To avoid churn, keep this slightly larger than `announce_interval`
peer_lifetime: 31m
# The address of redis storage.
redis_broker: "redis://pwd@127.0.0.1:6379/0"
# The addresses of redis storage.
addresses: ["127.0.0.1:6379"]
# Database number
db: 0
# The timeout for reading a command reply from redis.
read_timeout: 15s