sivy / pystatsd

Python implementation of the Statsd client/server
http://pypi.python.org/pypi/pystatsd/
BSD 2-Clause "Simplified" License
358 stars 87 forks source link

Add support for custom back-ends #92

Open mayconbordin opened 9 years ago

mayconbordin commented 9 years ago

I've changed the server implementation in order to support custom back-ends. It reduces the amount of configuration for the server as well as simplifies the code as there's no need for checking which transport is to be used.

sivy commented 9 years ago

I like the idea, however would like to see more tests exercising the new backend types, and confirm that no breakage is going to happen for current users.

mayconbordin commented 9 years ago

I've included tests for the server and all the back-ends. I've also modified the ServerDaemon to start using the back-ends instead of giving all the options to the Server, the run_server arguments remain the same, with the only addition of the --delete-gauges argument.

The Server interface has changed only in the constructor, it's more simple now. But I'm assuming most people run the server as a daemon, in this case nothing has changed.