Commit Graph

62 Commits

Author SHA1 Message Date
Lawrence, Rendall
234c65333e Add workers config parameter to start concurrent listeners 2022-11-25 13:58:04 +03:00
Lawrence, Rendall
d8d6f2cf4b refactor code for context fallthrough 2022-11-01 17:02:24 +03:00
Lawrence, Rendall
d6de38bdbd (wip) pass context from frontend request down to store 2022-10-31 18:57:57 +03:00
Lawrence, Rendall
dff0ba6da8 (wip) rework configuration to support multiple frontends 2022-10-21 17:53:03 +03:00
Širhoe Biazhkovič
3506865329 add download count number while scrape
* remove storage configuration print
* change test for pg storage
2022-10-17 18:37:07 +03:00
Lawrence, Rendall
694592f881 fix list warnings
* remove deprecated lint checks
* reformat files
* update dependencies
2022-09-06 13:34:57 +03:00
Lawrence, Rendall
0fd0e06360 (tested) change DataStorage interface to accept byte array as value 2022-06-23 21:01:05 +03:00
Lawrence, Rendall
8430e1f31f 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
2022-06-15 21:42:43 +03:00
Lawrence, Rendall
79c92df0f8 (tested) add hooks check when ping http route called 2022-05-14 01:36:21 +03:00
Lawrence, Rendall
c50a532181 (tested) complete replace logrus with zerolog
* remove cobra dependency and split execs to mochi and e2e

* add log init synchronization
2022-05-02 03:13:58 +03:00
Lawrence, Rendall
4d646f7c09 (wip) migrate to zerolog 2022-05-01 01:39:21 +03:00
Lawrence, Rendall
64b27c2df6 (tested) preserve all addresses of peer
* add multiple addresses in request structures and frontend parsers

* move per-ip peer fetch/store from storage to internal hooks

* fetch/store both v1 and v2 info hashes
2022-04-27 00:52:17 +03:00
Lawrence, Rendall
b365abd296 (untested) sanitize code
* remove peer argument from scrape swarm storage call

* replace Peer field with netip.Addr in ScrapeRequest

* add man for keydb storage

* update readme
2022-04-25 19:05:41 +03:00
Lawrence, Rendall
ef03291efe (tested) rollback to separate v4 and v6 keys in redis/keydb
* sanitize log fields
* remove miniredis dependency
* store/collect information about hybrid (v2to1) hashes
2022-04-24 20:32:15 +03:00
Lawrence, Rendall
22f459315b (wip) implement keydb store
* make redis store reusable for keydb
* replace redis HKeys calls in AnnouncePeers with HRandField
* change signature of storage.ScrapeSwarm
2022-04-24 02:23:18 +03:00
Lawrence, Rendall
4131c64e89 (wip) create new driver for KeyDB
* move GC and prometheus aware storage functions to separate interfaces
2022-04-23 01:28:06 +03:00
Lawrence, Rendall
01064fd21a (tested) split storage to data and peer interfaces,
add option for persisting (or not) torrent approval data
2022-04-16 18:50:19 +03:00
Lawrence, Rendall
965df2a9c3 (untested) Merge commit 24ab4ae from https://github.com/jzelinskie/chihaya 2022-04-16 01:22:24 +03:00
Lawrence, Rendall
8cd8343757 (tested) refactor code
* add sentinel master parameter into driver config
* replace yaml double deserialization with `mapstructure` in initializers
* replace struct initializers with registered functions
* add torrent approval MD and a sanitize rest MDs
2022-04-16 00:51:48 +03:00
Lawrence, Rendall
397e106396 (tested) fix redis to pass tests
* delete info hash count key from redis (replaced with SCARD on infohash set)
* add GC test
* add peer.Addr() functio to always return unwrapped address if 4to6 appear
2022-04-15 01:33:45 +03:00
Lawrence, Rendall
5c2471ca9b (untested) Merge commit e56ad81 from https://github.com/jzelinskie/chihaya
* rename/replace redis keys
2022-04-14 19:14:12 +03:00
Lawrence, Rendall
781fa9440f (done) replace redigo with go-redis
* replace redis keys with RawString encoded values (delete SerializedPeer)
* merge peers got from pre-hools with store data
2022-04-14 01:13:18 +03:00
Širhoe Biazhkovič
c7edbb52f2 Merge commits 129aac230aa..828edb8fd8b from https://github.com/chihaya/chihaya 2022-04-12 15:58:14 +03:00
Lawrence, Rendall
4dbbb4ad83 Rename to MoChi 2021-12-21 15:24:25 +03:00
Širhoe Biazhkovič
beb4736b86 Implement simple PGDC methods for storage
* sanitize code a little
* move e2e build to 'e2e' tag
2021-12-21 15:24:25 +03:00
Širhoe Biazhkovič
566d99fcd7 Gegin work on shared store for handlers 2021-12-21 15:24:25 +03:00
Jimmy Zelinskie
7dbbc86380 middleware: add a registration model 2017-12-29 16:55:48 -05:00
Leo Balduf
6198491194 storage: document PeerStore in more detail 2017-12-02 22:41:56 +01:00
Leo Balduf
8ed171b0ea pkg/log: create wrapper around logrus 2017-06-26 20:46:40 +02:00
Jimmy Zelinskie
7786e1a915 storage: enforce all peer stores are loggable 2017-06-04 16:06:01 -04:00
Jimmy Zelinskie
496cc1a31d storage: dynamically register drivers 2017-06-03 15:47:58 -04:00
Jimmy Zelinskie
a4b08c021b mv pkg/stopper pkg/stop
This makes most of the callsites stutter slightly less.
2017-02-02 21:09:25 -05:00
Leo Balduf
3c098c0703 middleware: add sanitization hook 2017-01-20 20:29:59 +01:00
Jimmy Zelinskie
e3e545e22e stopper: move to pkg package
This also adds a package docs for the stopper package.
2016-12-11 21:36:01 -05:00
Leo Balduf
45a5e632ae responseHook: always include the announcing peer
Fixes #231
Fixes #232
2016-09-29 18:51:05 -04:00
Leo Balduf
b1576da355 storage: add ScrapeSwarm method 2016-09-08 11:28:23 -04:00
Jimmy Zelinskie
cc6614c474 rename back to chihaya 2016-08-16 22:17:10 -04:00
Jimmy Zelinskie
6fddcb8eea remove gc from storage, but implement it in memory 2016-08-16 22:17:10 -04:00
Jimmy Zelinskie
c3137508d0 make new storage pkg with memory impl 2016-08-16 22:17:10 -04:00
Jimmy Zelinskie
3bfb3074b4 overhaul everything 2014-06-23 22:47:43 -04:00
Justin Li
fe1a4a6a65 Remove the rest of slots 2013-12-05 20:12:15 -05:00
Jimmy Zelinskie
90f8cf23a0 storage/tracker docs updated 2013-11-04 02:41:30 -05:00
Jimmy Zelinskie
2cd7f0d22f package shuffling: models -> storage, old storage -> web 2013-10-04 04:19:43 -04:00
Justin Li
7e402b162f Add interface for loading data from storage 2013-09-06 21:38:56 -04:00
Justin Li
eff8e70cde Make the batter driver follow the updated storage interface 2013-09-06 19:13:44 -04:00
Justin Li
080a24c7be Set up initial outbound synchronization structure 2013-09-06 18:39:14 -04:00
Jimmy Zelinskie
107ec1dd15 more work towards new architecture 2013-08-26 14:38:45 -04:00
Jimmy Zelinskie
d3f3c81c61 initial architecture overhaul 2013-08-23 15:39:42 -04:00
Justin Li
5084a2ac94 Clean up Tx API 2013-08-13 02:06:15 -04:00
Jimmy Zelinskie
40505091f5 storage reorganized around a pool and transactions 2013-07-25 10:03:04 -04:00