Commit Graph

1504 Commits

Author SHA1 Message Date
Lawrence, Rendall
21eaea2b8a (untested) implement gc, stats and scrape in pg storage
fix query call to use columns names while row scan
2022-06-16 17:49:20 +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
615bcb2050 update dependencies
Resolves #9 #10
2022-06-01 19:59:05 +03:00
Lawrence, Rendall
79c92df0f8 (tested) add hooks check when ping http route called 2022-05-14 01:36:21 +03:00
Lawrence, Rendall
cf2adad4c9 (tested) fix invalid parsing of multivalued and comma-separated addresses from HTTP header v0.0.1 2022-05-02 23:12:13 +03:00
SOT-TECH
607f9da00a Merge pull request #8 from sot-tech/zerolog
Zerolog
2022-05-02 18:37:40 +08: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
4d646f7c09 (wip) migrate to zerolog 2022-05-01 01:39:21 +03:00
Lawrence, Rendall
6aab7e8340 (minor) change log level in HandleAnnounce 2022-04-27 01:01:07 +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
081d3752d8 (tested) fix static check warnings
* UDP writer: defer buffer close
* HTTP writer: remove duplicated compact4/6
2022-04-25 16:05:19 +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
0d4a2a751e (tested) fix wait group race in udp frontend 2022-04-24 21:37:57 +03:00
SOT-TECH
54aa734cae Merge pull request #7 from sot-tech/gh-actions-patch
Revert entry point for keydb
2022-04-24 21:21:49 +03:00
SOT-TECH
c28729fc92 Revert entry point for keydb 2022-04-24 21:20:14 +03:00
SOT-TECH
fa60c70a57 Disable protected mode in keydb 2022-04-24 20:53:48 +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
a1ce79b003 (untested) merge ipv4 and ipv6 peers and pass v4 peers from db to v6 requester 2022-04-22 00:54:56 +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
7716aa828a (minor) Merge commits 7a4c2ee..77b3bf9 from https://github.com/jzelinskie/chihaya 2022-04-16 21:24:35 +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
05fe8e113a Update README 2022-04-14 12:23:13 +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
1fcddf5102 (WIP) replace redigo with go-redis 2022-04-13 01:12:00 +03:00
Lawrence, Rendall
c9e0af8b1e fix lint errors 2022-04-12 21:48:54 +03:00
Lawrence, Rendall
64eaf9d733 Fix lint gosec and ifshort issues 2022-04-12 18:51:03 +03:00
Lawrence, Rendall
554ae6fcd6 Reformat comments 2022-04-12 18:32:17 +03:00
Lawrence, Rendall
1e5330ea7e Fix default branch in actions configurations 2022-04-12 18:13:34 +03:00
Lawrence, Rendall
c1956d68f6 Remove YAML/MD lint configs, reformat stdlib imports 2022-04-12 18:10:51 +03:00
SOT-TECH
ec49168db9 Merge pull request #4 from sot-tech/dependabot/github_actions/nosborn/github-action-markdown-cli-3.0.1
build(deps): bump nosborn/github-action-markdown-cli from 2.0.0 to 3.0.1
2022-04-12 17:39:48 +03:00
SOT-TECH
ec4f711aa7 Merge pull request #6 from sot-tech/dependabot/github_actions/golangci/golangci-lint-action-3
build(deps): bump golangci/golangci-lint-action from 2 to 3
2022-04-12 17:39:25 +03:00
SOT-TECH
e744c5a4de Merge pull request #5 from sot-tech/dependabot/github_actions/actions/checkout-3
build(deps): bump actions/checkout from 2 to 3
2022-04-12 17:37:24 +03:00
dependabot[bot]
4a62fbc465 build(deps): bump golangci/golangci-lint-action from 2 to 3
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 2 to 3.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-12 14:36:11 +00:00
dependabot[bot]
859f88eae3 build(deps): bump actions/checkout from 2 to 3
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-12 14:36:11 +00:00
SOT-TECH
4159802640 Merge pull request #3 from sot-tech/dependabot/github_actions/actions/setup-go-3
build(deps): bump actions/setup-go from 2 to 3
2022-04-12 17:35:32 +03:00
dependabot[bot]
e18fed307a build(deps): bump nosborn/github-action-markdown-cli from 2.0.0 to 3.0.1
Bumps [nosborn/github-action-markdown-cli](https://github.com/nosborn/github-action-markdown-cli) from 2.0.0 to 3.0.1.
- [Release notes](https://github.com/nosborn/github-action-markdown-cli/releases)
- [Commits](https://github.com/nosborn/github-action-markdown-cli/compare/v2.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: nosborn/github-action-markdown-cli
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-12 14:25:06 +00:00
dependabot[bot]
47d51a556b build(deps): bump actions/setup-go from 2 to 3
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 2 to 3.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-12 14:25:03 +00:00
Širhoe Biazhkovič
c7edbb52f2 Merge commits 129aac230aa..828edb8fd8b from https://github.com/chihaya/chihaya 2022-04-12 15:58:14 +03:00
Lawrence, Rendall
c858576f76 Update dependencies 2022-03-08 14:10:04 +03:00