Commit graph

101 commits

Author SHA1 Message Date
Jimmy Zelinskie
8d1244d1c2 pkg/bencode,server/http: more general interfaces
Fixes #156.
2016-04-03 23:05:00 -04:00
Jimmy Zelinskie
d5c00c24b1 Merge pull request #153 from mrd0ll4r/middleware-smallfix
hotfix: initialized scrape map
2016-04-02 20:31:40 -04:00
Josh de Kock
6197928253 middleware/response: make godoc string <80 chars 2016-04-03 01:25:22 +01:00
Leo Balduf
9c1168746a hotfix: initialized scrape map 2016-04-02 20:23:42 -04:00
Jimmy Zelinskie
c2ab84bd1e Merge pull request #150 from joshdekock/middleware-refactor-announce
middleware: add basic response middleware
2016-04-02 19:31:21 -04:00
Leo Balduf
52483407cc middleware: added infohash middleware 2016-04-02 18:47:51 -04:00
Josh de Kock
98afbe67da middleware: add basic response middleware
This commit adds a basic response middleware for both announces, and scrapes.

Completes one of the tasks in #145
2016-04-02 23:46:28 +01:00
Jimmy Zelinskie
f0a5d78036 Merge pull request #147 from joshdekock/middleware-refactor-peer-seed-leech-info
Add peer/seed info helper functions, and tests
2016-04-02 17:06:45 -04:00
Josh de Kock
a9d3c2e071 store/peer_store: Add tests & functions for getting info about peers
This commit adds four functions: GetSeeders, GetLeechers,
NumSeeders, and NumLeechers to the store/peer_store API. The
first two functions are for getting a list of all the
seeders/leechers by an info hash, the latter two are helper
functions which use the Get functions, combine the ipv4, and
ipv4, and then len() them. It also adds some minimal tests for
memory/peer_store.
2016-04-02 21:49:08 +01:00
Jimmy Zelinskie
e9c481e500 Merge pull request #143 from joshdekock/middleware-refactor-request-fix
http: stopped throwing error on invalid event
2016-03-31 10:11:19 -04:00
Leo Balduf
3a1b321528 middleware: fixed client middleware package 2016-03-30 15:29:04 -04:00
Josh de Kock
01abcad893 http/request: check if query.ErrKeyNotFound for event 2016-03-30 12:50:54 +01:00
Josh de Kock
978c6a36e7 http: stopped throwing error on invalid event
Event is an optional key, and if it's invalid or non-existent then it can just be assumed as 'none'
2016-03-29 23:18:58 +01:00
Leo Balduf
eca7d9ee72 store/server: normalized error messages/formatting 2016-03-11 21:22:03 +01:00
Leo Balduf
1ba0f92ceb store: normalized config 2016-03-11 21:21:31 +01:00
Jimmy Zelinskie
59517551e9 server/prom: get rid of unneeded graceful call 2016-03-05 11:12:54 -05:00
Leo Balduf
2a8eb9c719 store: added StringStore 2016-03-03 20:40:14 +01:00
Jimmy Zelinskie
33d6b1cd12 implement prometheus server 2016-03-02 21:05:33 -05:00
Jimmy Zelinskie
0dfc26caea remove config package 2016-03-02 21:05:33 -05:00
Leo Balduf
114322ce10 pool: fixed synchronization/stopping of the pool 2016-03-02 21:05:33 -05:00
Leo Balduf
34428cf465 config: fixed parsing of configs 2016-03-02 21:05:32 -05:00
Leo Balduf
919f97e4bf doc: fixed IP blacklist/whitelist middleware documentation capitalization/snake_caseation 2016-03-02 21:05:32 -05:00
Leo Balduf
fdb399be9f middleware: added client blacklist/whitelist middlewares 2016-03-02 21:05:32 -05:00
Leo Balduf
a64e655376 store: ClientStore now using chihaya.PeerID 2016-03-02 21:05:32 -05:00
Jimmy Zelinskie
7be6dcaaa3 http: update config to snake_case 2016-03-02 21:05:32 -05:00
Jimmy Zelinskie
82b4395b11 errors: remove errors package 2016-03-02 21:05:32 -05:00
Jimmy Zelinskie
50e5ff85af config.yaml: camelCase to snake_case 2016-03-02 21:05:32 -05:00
Jimmy Zelinskie
6327938545 memory: fix paren bug 2016-03-02 21:05:32 -05:00
Leo Balduf
50192d45c1 middleware: added IP blacklist/whitelist middlewares 2016-03-02 21:05:31 -05:00
Leo Balduf
1a4ecb133f store: now opening stores 2016-03-02 21:05:31 -05:00
Leo Balduf
1dab3978fb store: added IPStore and memory implementation 2016-03-02 21:05:31 -05:00
Leo Balduf
3b54069a1b various small fixes 2016-03-02 21:05:31 -05:00
Justin Li
b1f186b665 Set IP on the request object 2016-03-02 21:05:31 -05:00
Justin Li
75b4a20e56 Bring in more old behaviour, use types for peer_id and infohash 2016-03-02 21:05:31 -05:00
Justin Li
05b7b955a1 Address minor comments 2016-03-02 21:05:30 -05:00
Jimmy Zelinskie
bd33c0c66b initial middleware refactor 2016-03-02 21:05:30 -05:00
Jimmy Zelinskie
6d5290d85e transition to httprouter 2014-07-01 21:40:29 -04:00
Jimmy Zelinskie
9cb5b82dc7 log->glog; more bencode fixes 2014-06-30 23:21:08 -04:00
Jimmy Zelinskie
834e584f2d fix null ptrs, misuse of bencode 2014-06-30 14:59:31 -04:00
Jimmy Zelinskie
ac45708bfd fix passing of peer slices by reference 2014-06-29 01:23:55 -04:00
Jimmy Zelinskie
3999e35453 Refactor writing peers & IPv6 Compact support. Closes #14. 2014-06-28 20:44:43 -04:00
Jimmy Zelinskie
caba155b5d consistent logging 2014-06-26 17:10:39 -04:00
Jimmy Zelinskie
8775764fb6 deltas are now private only 2014-06-26 14:26:58 -04:00
Jimmy Zelinskie
42693e2a3b docs, signatures; glog for main; config.New() 2014-06-24 03:59:30 -04:00
Jimmy Zelinskie
3bfb3074b4 overhaul everything 2014-06-23 22:47:43 -04:00
Jimmy Zelinskie
cb99fce6c0 server.Prime and server.serveAnnounce test 2014-05-08 11:01:02 -04:00
Jimmy Zelinskie
58586e6718 fix accidental reorder 2014-05-08 06:49:16 -04:00
Jimmy Zelinskie
cf95b2d94b improve comments and logging 2014-05-08 06:48:32 -04:00
Jimmy Zelinskie
0fd90b86d3 announce.go; fmt nitpicks 2014-05-08 01:09:02 -04:00
Jimmy Zelinskie
7a05ab6d64 *_handler.go -> serve_*.go 2014-05-07 05:27:09 -04:00