(tested) complete replace logrus with zerolog

* remove cobra dependency and split execs to mochi and e2e

* add log init synchronization
This commit is contained in:
Lawrence, Rendall
2022-05-02 03:13:58 +03:00
parent 4d646f7c09
commit c50a532181
36 changed files with 753 additions and 707 deletions

View File

@@ -3,18 +3,18 @@
This storage mainly the same as Redis and uses some of [redis](redis.md) store logic
with next exceptions:
* peers stored in [sets](https://redis.io/docs/manual/data-types/#sets)
instead of [hashes](https://redis.io/docs/manual/data-types/#hashes);
* peers stored in [sets](https://redis.io/docs/manual/data-types/#sets)
instead of [hashes](https://redis.io/docs/manual/data-types/#hashes);
* keys such as `CHI_I`, `CHI_S_C` and `CHI_L_C` not used (at all);
* peer TTL relies on KeyDB's [EXPIREMEMBER](https://docs.keydb.dev/docs/commands/#expiremember)
command, so MoChi does not need to periodically check peer expiration;
* peer TTL relies on KeyDB's [EXPIREMEMBER](https://docs.keydb.dev/docs/commands/#expiremember)
command, so MoChi does not need to periodically check peer expiration;
* storage does not execute periodical statistics collection (peer/lecher/info hash count)
because:
* manual calculation (INC/DEC peers count) is not usable
* manual scan of all keys is quite expensive operation.
because:
* manual calculation (INC/DEC peers count) is not usable
* manual scan of all keys is quite expensive operation.
## Use Case