Documentation
¶
Index ¶
- Constants
- func ContainsKillingStoppingContainerEvents(c kubernetes.Interface, name, namespace string) bool
- func GetDefaultClient() *http.Client
- func GetNamespace() string
- func GetNodeSummary(c kubernetes.Interface, name string) ([]byte, error)
- func GetNodes(c kubernetes.Interface) (*v1.NodeList, error)
- func GetPVNameFromPVC(c kubernetes.Interface, namespace, pvcName string) (string, error)
- func GetPodContainerLogs(c kubernetes.Interface, name, container, namespace string, previous bool, ...) string
- func GetPodEvents(c kubernetes.Interface, name, namespace string) (*v1.EventList, error)
- func GetPodEventsStr(events *[]v1.Event) string
- func JsonEscape(i string) string
- func NewHTTPClient(timeout time.Duration) *http.Client
- func RandomString(n int) string
- func SetLogFormatter(formatter string)
Constants ¶
const (
DefaultHTTPTimeout = 30 * time.Second
)
Variables ¶
This section is empty.
Functions ¶
func ContainsKillingStoppingContainerEvents ¶ added in v0.4.0
func ContainsKillingStoppingContainerEvents( c kubernetes.Interface, name, namespace string) bool
ContainsKillingStoppingContainerEvents checks if the events contain an event with "Killing Stopping container" which indicates that a container could not be gracefully shutdown
func GetDefaultClient ¶ added in v0.10.5
func GetNamespace ¶ added in v0.10.5
func GetNamespace() string
GetNamespace returns the namespace where kwatch is running. It reads from POD_NAMESPACE environment variable and falls back to "kwatch".
func GetNodeSummary ¶ added in v0.8.0
func GetNodeSummary(c kubernetes.Interface, name string) ([]byte, error)
GetNodeSummary gets a list of nodes
func GetNodes ¶ added in v0.8.0
func GetNodes(c kubernetes.Interface) (*v1.NodeList, error)
GetNodes gets a list of nodes
func GetPVNameFromPVC ¶ added in v0.8.0
func GetPVNameFromPVC( c kubernetes.Interface, namespace, pvcName string) (string, error)
GetPVNameFromPVC returns the name of persistent volume given a namespace and persistent volume claim name
func GetPodContainerLogs ¶
func GetPodContainerLogs( c kubernetes.Interface, name, container, namespace string, previous bool, maxRecentLogLines int64) string
GetPodContainerLogs returns logs for specified container in pod
func GetPodEvents ¶ added in v0.9.0
GetPodEvents retrieves the events for a specific pod
func GetPodEventsStr ¶ added in v0.0.2
GetPodEventsStr returns formatted events as a string for specified pod
func JsonEscape ¶ added in v0.7.0
JsonEscape escapes the json special characters in a string
func RandomString ¶ added in v0.7.0
RandomString generates random string with provided n size
func SetLogFormatter ¶ added in v0.10.5
func SetLogFormatter(formatter string)
SetLogFormatter sets the log formatter based on the provided format string
Types ¶
This section is empty.