Documentation
¶
Index ¶
- Constants
- func Go(ctx context.Context) (err error)
- func Load() (changed bool, err error)
- func Reload() (err error)
- func Update() error
- func Watch(ctx context.Context)
- func Write() (err error)
- func WriteCerts() (err error)
- func WriteConfig() (err error)
- type Backend
- type Backends
- type HAProxyConfig
- type Service
Constants ¶
View Source
const MaximumAge = time.Duration(1 * time.Hour)
Variables ¶
This section is empty.
Functions ¶
func Go ¶
Go starts the service manager, which monitors etcd, writes configurations, and updates haproxy, as necessary
func Update ¶
func Update() error
Update regenerates the list of services and, if there were changes, writes the new configuration and reloads haproxy
func WriteCerts ¶
func WriteCerts() (err error)
WriteCerts writes each certificate in the service list to a file
Types ¶
type Backend ¶
type Backend struct { Name string // Name/Value of the backend LastSeen time.Time // Timestamp of last visibility }
A Backend represents a service provider within the cluster
type Backends ¶
type Backends []Backend
Backends represents a set of backends
type HAProxyConfig ¶
type Service ¶
type Service struct { Name string // Service Name DNS []string // DNS hostnames for service Cert string // Certificates (PEM) for service Backends Backends // List of active backends for the service }
Service represents a discrete service in the proxy
func ParseServiceNode ¶
ParseServiceNode reads in a service node and returns a *Service for it
Click to show internal directories.
Click to hide internal directories.