INNER CODE UNIT · Go
pollInterval
aws/amazon-vpc-cni-k8s · cmd/aws-k8s-agent/main.go:47
pollInterval = 5 * time.Second
pollTimeout = 30 * time.Second
)
func main() {
os.Exit(_main())
}
// startBackgroundAPIServerCheck checks API connectivity in the background
func startBackgroundAPIServerCheck(ipamContext *ipamd.IPAMContext) {
go func() {
log := logger.Get()
log.Info("Starting background API server connectivity check...")
// Create a new client for API server check
restCfg, err := k8sapi.GetRestConfig()
if err != nil {
log.Errorf("Failed to get REST config for background API check: %v", err)