Documentation ¶
Index ¶
- func FormatHealthStatusResponse(w io.Writer, sr *models.HealthStatusResponse, printAll, succinct, verbose bool, ...)
- func GetAndFormatHealthStatus(w io.Writer, succinct, verbose bool, maxLines int)
- func GetHostPrimaryAddress(node *models.NodeStatus) *models.PathStatus
- func Hint(err error) error
- func PathIsHealthy(cp *models.PathStatus) bool
- type Client
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatHealthStatusResponse ¶
func FormatHealthStatusResponse(w io.Writer, sr *models.HealthStatusResponse, printAll, succinct, verbose bool, maxLines int)
FormatHealthStatusResponse writes a HealthStatusResponse as a string to the writer.
'printAll', if true, causes all nodes to be printed regardless of status 'succinct', if true, causes node health to be output as one line per node 'verbose', if true, overrides 'succinct' and prints all information 'maxLines', if nonzero, determines the maximum number of lines to print
func GetAndFormatHealthStatus ¶
GetAndFormatHealthStatus fetches the health status from the cilium-health daemon via the default channel and formats its output as a string to the writer.
'succinct', 'verbose' and 'maxLines' are handled the same as in FormatHealthStatusResponse().
func GetHostPrimaryAddress ¶
func GetHostPrimaryAddress(node *models.NodeStatus) *models.PathStatus
GetHostPrimaryAddress returns the PrimaryAddress for the Host within node. If node.Host is nil, returns nil.
func PathIsHealthy ¶
func PathIsHealthy(cp *models.PathStatus) bool
PathIsHealthy checks whether ICMP and TCP(HTTP) connectivity to the given path is available.
Types ¶
type Client ¶
type Client struct {
clientapi.CiliumHealth
}
Client is a client for cilium health
func NewDefaultClient ¶
NewDefaultClient creates a client with default parameters connecting to UNIX domain socket.