Skip to content

Commit

Permalink
Disable BGP functionality on Windows since gobgp does not support thi…
Browse files Browse the repository at this point in the history
…s. (#919)

Update README
  • Loading branch information
nathanejohnson authored Dec 9, 2022
1 parent 4ed0d1a commit cbf3133
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 3 additions & 0 deletions bgp/bgp.go → bgp/bgp_nonwindows.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build !windows
// +build !windows

package bgp

import (
Expand Down
2 changes: 2 additions & 0 deletions bgp/bgp_test.go → bgp/bgp_nonwindows_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build !windows

package bgp

import (
Expand Down
22 changes: 22 additions & 0 deletions bgp/bgp_windows.go
Original file line number Diff line number Diff line change
@@ -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
}
4 changes: 4 additions & 0 deletions docs/content/feature/bgp.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cbf3133

Please sign in to comment.