Lawrence, Rendall
5513f1357d
fix lint warnings
...
replace naked returns with arguments (gofumpt@v0.9.1)
2025-09-22 17:11:05 +03:00
Lawrence, Rendall
e61045833a
fix lint warnings
2024-06-24 14:01:46 +03:00
Lawrence, Rendall
37c40f9231
(WIP) add LMDB storage
2024-05-21 18:39:55 +03:00
Lawrence, Rendall
2f01a7cfc8
(untested) refactor code, add separate call to create KV-store
2024-05-20 18:28:40 +03:00
Lawrence, Rendall
a5058b89d0
fix mutex deadlock om memory storage gc
2023-07-17 17:37:32 +03:00
Lawrence, Rendall
b956811e40
(untested) refactor code
2023-03-21 18:59:05 +03:00
Lawrence, Rendall
88f1ef7ca5
suppress context canceled error
2023-03-19 19:52:52 +03:00
Lawrence, Rendall
a69a476024
remove memory explicit deallocation because of race
2022-11-30 18:17:12 +03:00
Lawrence, Rendall
3b1b74ad4f
simplify udp connection ID generator
2022-11-29 18:15:21 +03:00
Lawrence, Rendall
19b4b68115
revert 7e3204b9dd and replace with map+rwmutex wrappers
2022-11-27 19:32:42 +03:00
Lawrence, Rendall
765ea51796
(minor) fix log call in memory.Validate
2022-11-27 17:19:55 +03:00
Lawrence, Rendall
83da66f1b1
pre-allocate peers in memory.AnnouncePeers
...
* change go version to 1.19 in linter
2022-11-27 17:07:31 +03:00
Lawrence, Rendall
7e3204b9dd
replace go map with cornelk/hashmap in memory store
2022-11-27 16:22:04 +03:00
Lawrence, Rendall
ef6d820c5b
Add cmd option for quick start w/o config file
2022-11-18 18:28:19 +03:00
Širhoe Biazhkovič
0cbc5854cd
refactor timecache
...
* change clock to `atomic.Int64`
* add `once` fields for starter and stopper
* update dependencies
note: go version updated to 1.19
2022-11-16 19:59:07 +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
c1e041b4f8
(wip) fix invalid http compact address encode
...
* add packages to loggers
* split config examples with different storages
2022-10-25 18:38:55 +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
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
463d478dad
(minor) sanitize code
2022-05-02 13:30:11 +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
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
72a03db654
(tested) fix panic while IPv6Peers/IPv4Peers append
...
* change memory swarm key type to Peer (it became comparable)
2022-04-25 14:27:05 +03:00
Lawrence, Rendall
7471697c20
(tested) combine v4 and v6 peers response in memory store
2022-04-24 23:46:20 +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
3bc2276fb3
(tested) Refactor code
...
* merge 9d04e4c from https://github.com/jzelinskie/chihaya
* sanitize ip address on Scrape requests
* remove NewConnectionID and ValidConnectionID functions from production code
2022-04-21 21:57:18 +03:00
Lawrence, Rendall
f9c72341c0
(minor) refactor redis GC and fix TX calls,
...
add indicator that metrics are running
2022-04-17 00:57:30 +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
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
57d9c8e78e
clear store error in responseHook if ErrResourceDoesNotExist appear
2022-04-14 01:52:52 +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
Lawrence, Rendall
554ae6fcd6
Reformat comments
2022-04-12 18:32:17 +03:00
Lawrence, Rendall
c1956d68f6
Remove YAML/MD lint configs, reformat stdlib imports
2022-04-12 18:10:51 +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č
d438ad58fe
Test v2 hashes with qbt
2021-12-21 15:24:25 +03:00
Širhoe Biazhkovič
0a5ac35c4d
Fix e2e execution, append 2to1 hash in approvals, update dependencies
2021-12-21 15:24:25 +03:00
Širhoe Biazhkovič
9122aefdd7
Fix storage tests
...
* reformat sources #JR1356
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
Širhoe Biazhkovič
823b92fe83
Disable prometheus fot in-memory store if period set to 0
2021-10-20 17:16:11 +03:00