healthcheck

package
v0.1.38 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

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

func GetProxyTestEndpoint() (string, error)

func GetVPNCheckEndpoint

func GetVPNCheckEndpoint() (string, error)

func RunHealthCheck

func RunHealthCheck(checkVPN, checkProxy bool) func(cmd *cobra.Command, args []string)

Types

type DefaultHTTPClientImpl

type DefaultHTTPClientImpl struct {
	Client *http.Client
}

func (DefaultHTTPClientImpl) Get

type DefaultNetworkInterfaceImpl

type DefaultNetworkInterfaceImpl struct{}

Default implementations

func (DefaultNetworkInterfaceImpl) Interfaces

func (d DefaultNetworkInterfaceImpl) Interfaces() ([]net.Interface, error)

type HTTPClient

type HTTPClient interface {
	Get(url string) (*http.Response, error)
}

type NetworkInterface

type NetworkInterface interface {
	Interfaces() ([]net.Interface, error)
}

Interfaces for dependencies

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL