func()

in main/handlersettings.go [80:95]


func (h handlerSettings) validate() error {
	if h.protocol() == "tcp" && h.port() == 0 {
		return errTcpConfigurationMustIncludePort
	}

	if h.protocol() == "tcp" && h.requestPath() != "" {
		return errTcpMustNotIncludeRequestPath
	}

	probeSettlingTime := h.intervalInSeconds() * h.numberOfProbes()
	if probeSettlingTime > maximumProbeSettleTime {
		return errProbeSettleTimeExceedsThreshold
	}

	return nil
}