Demonstration Gem meant to be run as a server daemon for querying and controlling HAProxy.
A single object represents HAProxy config
Another object represents HAProxy service daemon
Another object represents a listening server daemon.
The Listening server daemon only supports two operations, with three results.
- Get backend config, returns the HAProxy backend config
- Modify listening server, sets the HAProxy backend config and reloads HAProxy
- Invalid input, returns error.
Add this line to your application's Gemfile:
gem 'haproxy_rest'
And then execute:
$ bundle
Or install it yourself as:
$ gem install haproxy_rest
require 'haproxy_rest'
HaproxyRest.run()
- Fork it ( https://github.com/[my-github-username]/haproxy_rest/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request