Documentation
¶
Index ¶
- Variables
- func CheckBackplaneAPIConnectivity(client HTTPClient, proxyURL string) error
- func CheckProxyConnectivity(client HTTPClient) (string, error)
- func CheckVPNConnectivity(netInterfaces NetworkInterface, client HTTPClient) error
- func GetProxyTestEndpoint() (string, error)
- func GetVPNCheckEndpoint() (string, error)
- func RunHealthCheck(checkVPN, checkProxy bool) func(cmd *cobra.Command, args []string)
- type DefaultHTTPClientImpl
- type DefaultNetworkInterfaceImpl
- type HTTPClient
- type NetworkInterface
Constants ¶
This section is empty.
Variables ¶
var ( NetInterfaces NetworkInterface = DefaultNetworkInterfaceImpl{} HTTPClients HTTPClient = DefaultHTTPClientImpl{Client: &http.Client{}} GetVPNCheckEndpointFunc = GetVPNCheckEndpoint GetProxyTestEndpointFunc = GetProxyTestEndpoint GetConfigFunc = config.GetBackplaneConfiguration )
Functions ¶
func CheckBackplaneAPIConnectivity ¶
func CheckBackplaneAPIConnectivity(client HTTPClient, proxyURL string) error
CheckBackplaneAPIConnectivity tests connectivity to the Backplane API using the provided proxy. It retrieves the Backplane configuration and tests the API endpoint accessibility.
func CheckProxyConnectivity ¶
func CheckProxyConnectivity(client HTTPClient) (string, error)
CheckProxyConnectivity checks the proxy connectivity
func CheckVPNConnectivity ¶
func CheckVPNConnectivity(netInterfaces NetworkInterface, client HTTPClient) error
CheckVPNConnectivity checks the VPN connectivity
func GetProxyTestEndpoint ¶
GetProxyTestEndpoint retrieves the proxy test endpoint from the backplane configuration. Returns an error if the configuration cannot be loaded or the endpoint is not configured.
func GetVPNCheckEndpoint ¶
GetVPNCheckEndpoint retrieves the VPN check endpoint from the backplane configuration. Returns an error if the configuration cannot be loaded or the endpoint is not configured.
func RunHealthCheck ¶
RunHealthCheck returns a cobra command handler that performs connectivity health checks. It can check VPN connectivity, proxy connectivity, or both based on the provided flags. When neither flag is set, it performs comprehensive connectivity checks.
Types ¶
type DefaultHTTPClientImpl ¶
type DefaultNetworkInterfaceImpl ¶
type DefaultNetworkInterfaceImpl struct{}
Default implementations
func (DefaultNetworkInterfaceImpl) Interfaces ¶
func (d DefaultNetworkInterfaceImpl) Interfaces() ([]net.Interface, error)
type NetworkInterface ¶
Interfaces for dependencies