Documentation ¶
Index ¶
- Constants
- func Initialize()
- func RunAPI()
- type PgRouteHandler
- func (prh PgRouteHandler) CreateAvailabilityTable()
- func (prh PgRouteHandler) GetNodeAvailability(name string, limit float64) string
- func (prh PgRouteHandler) GetNodeStatus(name string) string
- func (prh PgRouteHandler) GetPrimaries(group string) (primaries []string)
- func (prh PgRouteHandler) GetStandbys(group string) (standbys []string)
- func (prh PgRouteHandler) UpdateNodeAvailability()
- type RouteConfig
- type RouteConnections
- type RouteHostGroup
- type RouteHostGroups
- type RouteHostsConfig
- type RouteSSLConfig
Constants ¶
View Source
const ( GHStatusInvalid = "invalid" GHStatusOk = "ok" GHStatusPrimary = "primary" GHStatusStandby = "standby" )
Variables ¶
This section is empty.
Functions ¶
func Initialize ¶
func Initialize()
Types ¶
type PgRouteHandler ¶
type PgRouteHandler struct {
// contains filtered or unexported fields
}
func NewPgRouteHandler ¶
func NewPgRouteHandler() *PgRouteHandler
func (PgRouteHandler) CreateAvailabilityTable ¶ added in v0.8.5
func (prh PgRouteHandler) CreateAvailabilityTable()
func (PgRouteHandler) GetNodeAvailability ¶ added in v0.8.5
func (prh PgRouteHandler) GetNodeAvailability(name string, limit float64) string
func (PgRouteHandler) GetNodeStatus ¶
func (prh PgRouteHandler) GetNodeStatus(name string) string
func (PgRouteHandler) GetPrimaries ¶
func (prh PgRouteHandler) GetPrimaries(group string) (primaries []string)
func (PgRouteHandler) GetStandbys ¶
func (prh PgRouteHandler) GetStandbys(group string) (standbys []string)
func (PgRouteHandler) UpdateNodeAvailability ¶ added in v0.8.5
func (prh PgRouteHandler) UpdateNodeAvailability()
type RouteConfig ¶
type RouteConfig struct { Hosts RouteHostsConfig `yaml:"hosts"` Groups RouteHostGroups `yaml:"groups"` Bind string `yaml:"bind"` Port int `yaml:"port"` Ssl RouteSSLConfig `yaml:"ssl"` LogLevel string `yaml:"loglevel"` LogFile string `yaml:"logfile"` }
func NewConfig ¶
func NewConfig() (config RouteConfig, err error)
func (RouteConfig) BindTo ¶
func (rc RouteConfig) BindTo() string
func (RouteConfig) Debug ¶ added in v0.8.4
func (rc RouteConfig) Debug() bool
func (RouteConfig) GroupHosts ¶ added in v0.8.5
func (rc RouteConfig) GroupHosts(groupName string) RouteHostGroup
GroupHosts returns a list of hosts that are part of a group as defined in rc.HostGroups. HostGroup "all" is a special placeholder for all hosts defined in rc.Hosts.
type RouteConnections ¶ added in v0.8.5
func (RouteConnections) FilteredConnections ¶ added in v0.8.5
func (rcs RouteConnections) FilteredConnections(filter []string) RouteConnections
type RouteHostGroup ¶ added in v0.8.5
type RouteHostGroup []string
type RouteHostGroups ¶ added in v0.8.5
type RouteHostGroups map[string]RouteHostGroup
type RouteHostsConfig ¶
type RouteSSLConfig ¶
func (RouteSSLConfig) CertBytes ¶
func (rsc RouteSSLConfig) CertBytes() ([]byte, error)
func (RouteSSLConfig) Enabled ¶
func (rsc RouteSSLConfig) Enabled() bool
func (RouteSSLConfig) KeyBytes ¶
func (rsc RouteSSLConfig) KeyBytes() ([]byte, error)
func (RouteSSLConfig) MustCertBytes ¶
func (rsc RouteSSLConfig) MustCertBytes() []byte
func (RouteSSLConfig) MustKeyBytes ¶
func (rsc RouteSSLConfig) MustKeyBytes() []byte
Click to show internal directories.
Click to hide internal directories.