Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnMonitor ¶ added in v1.2.0
type ConnMonitor struct{}
ConnMonitor is a struct that implements monitoring of backend server connections by checking their availability.
func (ConnMonitor) CheckBackendConnection ¶ added in v1.2.0
func (ConnMonitor) CheckBackendConnection(server *config.BackendServer) error
CheckBackendConnection attempts to establish a connection to a backend server to verify its availability. It returns an error if the connection cannot be established, using the specified configuration parameters.
type Monitor ¶ added in v1.2.0
type Monitor interface { // CheckBackendConnection checks the backend connection of a server based on the provided Host address, port number, whether the server runs with HAProxy V2 protocol, and whether TLS should be used. It returns an error if the connection fails. CheckBackendConnection(server *config.BackendServer) error }
Monitor defines an interface for monitoring and checking backend server connections. It provides a method to verify connectivity using specified configurations.
func NewMonitor ¶ added in v1.2.0
func NewMonitor() Monitor
NewMonitor returns a new instance of the Monitor interface. The returned Monitor is implemented by the ConnMonitor struct.
Click to show internal directories.
Click to hide internal directories.