Documentation ¶
Index ¶
- func FormatHealthStatusResponse(w io.Writer, sr *models.HealthStatusResponse, printAll, succinct, verbose bool, ...)
- func GetAllEndpointAddresses(node *models.NodeStatus) []*models.PathStatus
- func GetAllHostAddresses(node *models.NodeStatus) []*models.PathStatus
- func GetAndFormatHealthStatus(w io.Writer, succinct, verbose bool, maxLines int)
- func GetAndFormatModulesHealth(w io.Writer, ss []types.Status, verbose bool)deprecated
- func GetEndpointPrimaryAddress(node *models.NodeStatus) *models.PathStatus
- func GetEndpointSecondaryAddresses(node *models.NodeStatus) []*models.PathStatus
- func GetHostPrimaryAddress(node *models.NodeStatus) *models.PathStatus
- func GetHostSecondaryAddresses(node *models.NodeStatus) []*models.PathStatus
- func Hint(err error) error
- func Render(ss []types.Status)
- func SummarizePathConnectivityStatusType(cps []*models.PathStatus) map[ConnectivityStatusType]int
- func ToAgeHuman(t time.Time) string
- type Client
- type ConnectivityStatusType
- type TreeView
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 GetAllEndpointAddresses ¶
func GetAllEndpointAddresses(node *models.NodeStatus) []*models.PathStatus
GetAllEndpointAddresses returns a list of all addresses (primary and any secondary) for the health endpoint within a given node. If node.HealthEndpoint is nil, returns nil.
func GetAllHostAddresses ¶
func GetAllHostAddresses(node *models.NodeStatus) []*models.PathStatus
GetAllHostAddresses returns a list of all addresses (primary and any and any secondary) for the host of a given node. If node.Host is nil, returns nil.
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 GetAndFormatModulesHealth
deprecated
GetAndFormatModulesHealth retrieves modules health and formats output.
Deprecated: Following #30925 we will move to either a separate cilium-dbg command or use health statedb dump data to render status reports externally. Following this we should remove this output as part of status in version v1.17.
func GetEndpointPrimaryAddress ¶
func GetEndpointPrimaryAddress(node *models.NodeStatus) *models.PathStatus
GetEndpointPrimaryAddress returns the PrimaryAddress for the health endpoint within node. If node.HealthEndpoint is nil, returns nil.
func GetEndpointSecondaryAddresses ¶
func GetEndpointSecondaryAddresses(node *models.NodeStatus) []*models.PathStatus
GetEndpointSecondaryAddresses returns the secondary health endpoint addresses (if any)
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 GetHostSecondaryAddresses ¶
func GetHostSecondaryAddresses(node *models.NodeStatus) []*models.PathStatus
GetHostSecondaryAddresses returns the secondary host addresses (if any)
func SummarizePathConnectivityStatusType ¶
func SummarizePathConnectivityStatusType(cps []*models.PathStatus) map[ConnectivityStatusType]int
Returns a map of ConnectivityStatusType --> # of paths with ConnectivityStatusType
func ToAgeHuman ¶ added in v1.15.0
ToAgeHuman converts time to duration.
Types ¶
type Client ¶
type Client struct {
clientapi.CiliumHealthAPI
}
Client is a client for cilium health
func NewDefaultClient ¶
NewDefaultClient creates a client with default parameters connecting to UNIX domain socket.
type ConnectivityStatusType ¶
type ConnectivityStatusType int
const ( ConnStatusReachable ConnectivityStatusType = 0 ConnStatusUnreachable ConnectivityStatusType = 1 ConnStatusUnknown ConnectivityStatusType = 2 )
func GetConnectivityStatusType ¶
func GetConnectivityStatusType(cs *models.ConnectivityStatus) ConnectivityStatusType
func GetPathConnectivityStatusType ¶
func GetPathConnectivityStatusType(cp *models.PathStatus) ConnectivityStatusType
func SummarizePathConnectivityStatus ¶
func SummarizePathConnectivityStatus(cps []*models.PathStatus) ConnectivityStatusType
func (ConnectivityStatusType) String ¶
func (c ConnectivityStatusType) String() string
type TreeView ¶ added in v1.16.0
type TreeView struct {
// contains filtered or unexported fields
}
func NewTreeView ¶ added in v1.16.0
func NewTreeView() *TreeView