MCPcopy Create free account
hub / github.com/aws/aws-node-termination-handler / getUptimeFunc

Function getUptimeFunc

pkg/node/node.go:916–923  ·  view source on GitHub ↗
(uptimeFile string)

Source from the content-addressed store, hash-verified

914}
915
916func getUptimeFunc(uptimeFile string) uptime.UptimeFuncType {
917 if uptimeFile != "" {
918 return func() (int64, error) {
919 return uptime.UptimeFromFile(uptimeFile)
920 }
921 }
922 return uptime.Uptime
923}
924
925func filterPodForDeletion(podName, podNamespace string) func(pod corev1.Pod) drain.PodDeleteStatus {
926 return func(pod corev1.Pod) drain.PodDeleteStatus {

Callers 3

NewFunction · 0.85
TestGetUptimeFuncDefaultFunction · 0.85

Calls 1

UptimeFromFileFunction · 0.92

Tested by 2

TestGetUptimeFuncDefaultFunction · 0.68