Cecylia Bocovich
981abffbd9
Add proxy type to stats exported by broker
2019-11-28 13:52:58 -05:00
Cecylia Bocovich
7277bb37cd
Update broker--proxy protocol with proxy type
...
Proxies now include information about what type they are when they poll
for client offers. The broker saves this information along with
snowflake ids and outputs it on the /debug page.
2019-11-28 13:52:58 -05:00
Cecylia Bocovich
c4ae64905b
Redo protocol for proxy--broker messages
...
Switch to containing all communication between the proxy and the broker
in the HTTP response body. This will make things easier if we ever use
something other than HTTP communicate between different actors in the
snowflake system.
Other changes to the protocol are as follows:
- requests are accompanied by a version number so the broker can be
backwards compatable if desired in the future
- all responses are 200 OK unless the request was badly formatted
2019-11-13 10:54:48 -05:00
Shane Howearth
3cfceb3755
Handle generated errors in broker
2019-10-08 10:13:29 -04:00
Cecylia Bocovich
908cf3fc64
Updated tests to check new stats
...
Updated the tests to pass with our new snowflake-ips-total stat
2019-06-25 10:06:00 -04:00
Cecylia Bocovich
f779013b2d
Fixed small formatting errors of log output
...
- removed trailing ","s
- removed unecessary space before seconds
2019-06-14 17:09:06 -04:00
Cecylia Bocovich
fe3356a54d
Unit tests for metrics code
...
Added unit tests for metrics logging. Refactored the logMetrics()
function to allow for easier testing
2019-06-12 10:14:21 -04:00
Cecylia Bocovich
0842dad38e
Added tests to check large read guards
2019-05-28 13:29:59 -04:00
Arlo Breault
b77a99b565
Fix broker tests
...
NewBrokerContext now requires a logger so give it one to discard the
logs.
2019-05-16 12:34:21 -04:00
Cecylia Bocovich
171c55a9b1
Implemented geoip lookups for the snowflake broker. This heavily based off of how tor maps IP addresses to country codes, and relies on the provided ipv4 and ipv6 files.
2019-04-29 17:10:15 -04:00
Hooman
b7df69fa55
Make Broker run standalone
2017-06-29 13:51:55 -07:00
Serene Han
661286894a
another goconvey test for RequestOffer, fix data race in the Broker test
2016-02-17 12:52:51 -08:00
Serene Han
2ae6559001
move CORS early return into the ServeHTTP wrapper, rename handlers
2016-02-16 21:44:49 -08:00
Serene Han
791f6925ec
Simplify proxy poll handler, and broker match test
2016-02-16 21:11:32 -08:00
Serene Han
254223be0f
End-to-end Goconvey test for Broker passing SDP messages between concurrent client and proxy
...
request handlers
2016-02-15 12:23:40 -08:00
Serene Han
ee5f4558af
Second async test for Broker's proxy answer handler
2016-02-15 11:31:57 -08:00
Serene Han
032ab6bcb8
Async test for Broker's proxy handler
2016-02-14 16:19:20 -08:00
Serene Han
0e1c5a1756
Convert Broker SnowflakeHeap test to goconvey, and async test for client handler
2016-02-13 11:51:37 -08:00
Serene Han
b04d1f67fb
Add context to HTTP handlers, attempt to support localhost Broker.
...
Seems unlikely to work due to dev_appserver single inflight request limitation
2016-02-12 18:00:36 -08:00
Serene Han
0cd6852ad0
broker tracking a heap of snowflakes
2016-01-21 10:44:14 -08:00