diff --git a/README.md b/README.md index f96a87bab..77b84c9ff 100644 --- a/README.md +++ b/README.md @@ -82,9 +82,10 @@ It supports ([Full feature list](https://fabiolb.net/feature/)) * [Prometheus](https://fabiolb.net/feature/metrics/), * [Circonus](https://fabiolb.net/feature/metrics/), * [Graphite](https://fabiolb.net/feature/metrics/), -* [StatsD](https://fabiolb.net/feature/metrics/) and -* [DataDog](https://fabiolb.net/feature/metrics/) metrics -* [WebUI](https://fabiolb.net/feature/web-ui/) +* [StatsD](https://fabiolb.net/feature/metrics/), +* [DataDog](https://fabiolb.net/feature/metrics/) for metrics, +* [WebUI](https://fabiolb.net/feature/web-ui/) and +* [Advertising BGP anycast addresses](https://fabiolb.net/feature/bgp/) on non-windows platforms. [Watch](https://www.youtube.com/watch?v=gf43TcWjBrE&list=PL81sUbsFNc5b-Gd59Lpz7BW0eHJBt0GvE&index=1) Kelsey Hightower demo Consul, Nomad, Vault and fabio at HashiConf EU 2016. diff --git a/bgp/bgp.go b/bgp/bgp_nonwindows.go similarity index 99% rename from bgp/bgp.go rename to bgp/bgp_nonwindows.go index 24764bb7e..fb89123d6 100644 --- a/bgp/bgp.go +++ b/bgp/bgp_nonwindows.go @@ -1,3 +1,6 @@ +//go:build !windows +// +build !windows + package bgp import ( diff --git a/bgp/bgp_test.go b/bgp/bgp_nonwindows_test.go similarity index 99% rename from bgp/bgp_test.go rename to bgp/bgp_nonwindows_test.go index 1ad937a83..71fcfc603 100644 --- a/bgp/bgp_test.go +++ b/bgp/bgp_nonwindows_test.go @@ -1,3 +1,5 @@ +// +build !windows + package bgp import ( diff --git a/bgp/bgp_windows.go b/bgp/bgp_windows.go new file mode 100644 index 000000000..718f1fa4f --- /dev/null +++ b/bgp/bgp_windows.go @@ -0,0 +1,22 @@ +package bgp + +import ( + "errors" + "github.com/fabiolb/fabio/config" +) + +type BGPHandler struct{} + +var ErrNoWindows = errors.New("cannot run bgp on windows") + +func NewBGPHandler(config *config.BGP) (*BGPHandler, error) { + return nil, ErrNoWindows +} + +func (bgph *BGPHandler) Start() error { + return ErrNoWindows +} + +func ValidateConfig(config *config.BGP) error { + return ErrNoWindows +} diff --git a/docs/content/feature/bgp.md b/docs/content/feature/bgp.md index 0e9651748..8127ea57c 100644 --- a/docs/content/feature/bgp.md +++ b/docs/content/feature/bgp.md @@ -3,6 +3,10 @@ title: "BGP" since: "1.6.3" --- +NOTE: This feature does not work on Windows at present since the gobgp project +does not support windows. + + This feature integrates the functionality of [gobgpd](https://github.com/osrg/gobgp) with fabio. This is particularly useful in the scenario where we are using anycast IP addresses and want to dynamically advertise to upstream routers