INNER CODE UNIT · Go

healthcheck

moul/sshportal · healthcheck.go:16

func healthcheck(addr string, wait, quiet bool) error {
	cfg := gossh.ClientConfig{
		User:            "healthcheck",
		HostKeyCallback: func(hostname string, remote net.Addr, key gossh.PublicKey) error { return nil },
		Auth:            []gossh.AuthMethod{gossh.Password("healthcheck")},
	}

	if wait {
		for {
			if err := healthcheckOnce(addr, cfg, quiet); err != nil {
				if !quiet {
					log.Printf("error: %v", err)
				}
				time.Sleep(time.Second)
				continue
			}
			return nil
		}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…