Skip to content

Commit cbf3133

Browse files
Disable BGP functionality on Windows since gobgp does not support this. (#919)
Update README
1 parent 4ed0d1a commit cbf3133

5 files changed

Lines changed: 35 additions & 3 deletions

File tree

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,10 @@ It supports ([Full feature list](https://fabiolb.net/feature/))
8282
* [Prometheus](https://fabiolb.net/feature/metrics/),
8383
* [Circonus](https://fabiolb.net/feature/metrics/),
8484
* [Graphite](https://fabiolb.net/feature/metrics/),
85-
* [StatsD](https://fabiolb.net/feature/metrics/) and
86-
* [DataDog](https://fabiolb.net/feature/metrics/) metrics
87-
* [WebUI](https://fabiolb.net/feature/web-ui/)
85+
* [StatsD](https://fabiolb.net/feature/metrics/),
86+
* [DataDog](https://fabiolb.net/feature/metrics/) for metrics,
87+
* [WebUI](https://fabiolb.net/feature/web-ui/) and
88+
* [Advertising BGP anycast addresses](https://fabiolb.net/feature/bgp/) on non-windows platforms.
8889

8990
[Watch](https://www.youtube.com/watch?v=gf43TcWjBrE&list=PL81sUbsFNc5b-Gd59Lpz7BW0eHJBt0GvE&index=1)
9091
Kelsey Hightower demo Consul, Nomad, Vault and fabio at HashiConf EU 2016.

bgp/bgp.go renamed to bgp/bgp_nonwindows.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
//go:build !windows
2+
// +build !windows
3+
14
package bgp
25

36
import (
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// +build !windows
2+
13
package bgp
24

35
import (

bgp/bgp_windows.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package bgp
2+
3+
import (
4+
"errors"
5+
"github.com/fabiolb/fabio/config"
6+
)
7+
8+
type BGPHandler struct{}
9+
10+
var ErrNoWindows = errors.New("cannot run bgp on windows")
11+
12+
func NewBGPHandler(config *config.BGP) (*BGPHandler, error) {
13+
return nil, ErrNoWindows
14+
}
15+
16+
func (bgph *BGPHandler) Start() error {
17+
return ErrNoWindows
18+
}
19+
20+
func ValidateConfig(config *config.BGP) error {
21+
return ErrNoWindows
22+
}

docs/content/feature/bgp.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ title: "BGP"
33
since: "1.6.3"
44
---
55

6+
NOTE: This feature does not work on Windows at present since the gobgp project
7+
does not support windows.
8+
9+
610
This feature integrates the functionality of [gobgpd](https://github.com/osrg/gobgp)
711
with fabio. This is particularly useful in the scenario where we are using
812
anycast IP addresses and want to dynamically advertise to upstream routers

0 commit comments

Comments
 (0)