Documentation ¶
Overview ¶
Package monitors provides information and interaction with the Health Monitor API resource for the Rackspace Cloud Load Balancer service.
The load balancing service includes a health monitoring resource that periodically checks your back-end nodes to ensure they are responding correctly. If a node does not respond, it is removed from rotation until the health monitor determines that the node is functional. In addition to being performed periodically, a health check also executes against every new node that is added, to ensure that the node is operating properly before allowing it to service traffic. Only one health monitor is allowed to be enabled on a load balancer at a time.
As part of a good strategy for monitoring connections, secondary nodes should also be created which provide failover for effectively routing traffic in case the primary node fails. This is an additional feature that ensures that you remain up in case your primary node fails.
There are three types of health monitor: CONNECT, HTTP and HTTPS.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeleteResult ¶
type DeleteResult struct {
gophercloud.ErrResult
}
DeleteResult represents the result of an Delete operation.
func Delete ¶
func Delete(c *gophercloud.ServiceClient, id int) DeleteResult
Delete is the operation responsible for deleting a health monitor.
type GetResult ¶
type GetResult struct {
gophercloud.Result
}
GetResult represents the result of a Get operation.
func Get ¶
func Get(c *gophercloud.ServiceClient, id int) GetResult
Get is the operation responsible for showing details of a health monitor.
type Monitor ¶
type Monitor struct { // Number of permissible monitor failures before removing a node from // rotation. AttemptLimit int `mapstructure:"attemptsBeforeDeactivation"` // The minimum number of seconds to wait before executing the health monitor. Delay int // Maximum number of seconds to wait for a connection to be established // before timing out. Timeout int // Type of the health monitor. Type Type // A regular expression that will be used to evaluate the contents of the // body of the response. BodyRegex string // The name of a host for which the health monitors will check. HostHeader string // The HTTP path that will be used in the sample request. Path string // A regular expression that will be used to evaluate the HTTP status code // returned in the response. StatusRegex string }
Monitor represents a health monitor API resource. A monitor comes in three forms: CONNECT, HTTP or HTTPS.
A CONNECT monitor establishes a basic connection to each node on its defined port to ensure that the service is listening properly. The connect monitor is the most basic type of health check and does no post-processing or protocol-specific health checks.
HTTP and HTTPS health monitors are generally considered more intelligent and powerful than CONNECT. It is capable of processing an HTTP or HTTPS response to determine the condition of a node. It supports the same basic properties as CONNECT and includes additional attributes that are used to evaluate the HTTP response.
type UpdateConnectMonitorOpts ¶
type UpdateConnectMonitorOpts struct { // Required - number of permissible monitor failures before removing a node // from rotation. Must be a number between 1 and 10. AttemptLimit int // Required - the minimum number of seconds to wait before executing the // health monitor. Must be a number between 1 and 3600. Delay int // Required - maximum number of seconds to wait for a connection to be // established before timing out. Must be a number between 1 and 300. Timeout int }
UpdateConnectMonitorOpts represents the options needed to update a CONNECT monitor.
func (UpdateConnectMonitorOpts) ToMonitorUpdateMap ¶
func (opts UpdateConnectMonitorOpts) ToMonitorUpdateMap() (map[string]interface{}, error)
ToMonitorUpdateMap produces a map for updating CONNECT monitors.
type UpdateHTTPMonitorOpts ¶
type UpdateHTTPMonitorOpts struct { // Required - number of permissible monitor failures before removing a node // from rotation. Must be a number between 1 and 10. AttemptLimit int `mapstructure:"attemptsBeforeDeactivation"` // Required - the minimum number of seconds to wait before executing the // health monitor. Must be a number between 1 and 3600. Delay int // Required - maximum number of seconds to wait for a connection to be // established before timing out. Must be a number between 1 and 300. Timeout int // Required - a regular expression that will be used to evaluate the contents // of the body of the response. BodyRegex string // Required - the HTTP path that will be used in the sample request. Path string // Required - a regular expression that will be used to evaluate the HTTP // status code returned in the response. StatusRegex string // Optional - the name of a host for which the health monitors will check. HostHeader string // Required - either HTTP or HTTPS Type Type }
UpdateHTTPMonitorOpts represents the options needed to update a HTTP monitor.
func (UpdateHTTPMonitorOpts) ToMonitorUpdateMap ¶
func (opts UpdateHTTPMonitorOpts) ToMonitorUpdateMap() (map[string]interface{}, error)
ToMonitorUpdateMap produces a map for updating HTTP(S) monitors.
type UpdateOptsBuilder ¶
UpdateOptsBuilder is the interface options structs have to satisfy in order to be used in the main Update operation in this package.
type UpdateResult ¶
type UpdateResult struct {
gophercloud.ErrResult
}
UpdateResult represents the result of an Update operation.
func Update ¶
func Update(c *gophercloud.ServiceClient, id int, opts UpdateOptsBuilder) UpdateResult
Update is the operation responsible for updating a health monitor.