Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var MonitorMap = map[string]MonitorType{"port": Monitor_PORT, "exec": Monitor_EXEC, "consul": Monitor_CONSUL}
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { Name string Vip *Route VipConfig config.VipConfig Monitors Monitors Nats []string Source string }
type ConsulMon ¶
type ConsulMon struct {
// contains filtered or unexported fields
}
func NewConsulMon ¶
type ConsulServiceData ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController(config c.BgpConfig) (*Controller, error)
func (*Controller) AddPeer ¶
func (c *Controller) AddPeer(peer string) error
func (*Controller) Announce ¶
func (c *Controller) Announce(route *Route) error
func (*Controller) Shutdown ¶
func (c *Controller) Shutdown() error
func (*Controller) Withdraw ¶
func (c *Controller) Withdraw(route *Route) error
type MonitorMgr ¶
type MonitorMgr struct {
// contains filtered or unexported fields
}
MonitorMgr manages the lifecycle of registered apps
func NewMonitor ¶
func NewMonitor(config *c.Config) *MonitorMgr
func (*MonitorMgr) Cleanup ¶
func (m *MonitorMgr) Cleanup(app string, exit chan bool)
CleanUp periodically monitors for stale apps and cleans them up
func (*MonitorMgr) CloseAll ¶
func (m *MonitorMgr) CloseAll()
CloseAll shuts down all BGP sessions removes state
func (*MonitorMgr) GetInfo ¶
func (m *MonitorMgr) GetInfo() (*api.Peer, error)
GetInfo returns basic BGP info for established peers
func (*MonitorMgr) Remove ¶
func (m *MonitorMgr) Remove(appName string)
Remove removes an app from monitor manager, stops BGP / announcement and cleans up state
type MonitorType ¶
type MonitorType int
const ( Monitor_PORT MonitorType = 1 Monitor_EXEC MonitorType = 2 Monitor_CONSUL MonitorType = 3 )
func (MonitorType) String ¶
func (m MonitorType) String() string
Click to show internal directories.
Click to hide internal directories.