func (r *ReverseTunnel) Check() error {
	if strings.TrimSpace(r.DomainName) == "" {
		return trace.BadParameter("Reverse tunnel validation error: empty domain name")
	}

	if len(r.DialAddrs) == 0 {
		return trace.BadParameter("Invalid dial address for reverse tunnel '%v'", r.DomainName)
	}

	for _, addr := range r.DialAddrs {
		_, err := utils.ParseAddr(addr)
		if err != nil {
			return trace.Wrap(err)
		}
	}

	return nil
}
// Check returns nil if all parameters are good, error otherwise
Check returns nil if all parameters are good, error otherwise
// Check returns nil if all parameters are good error otherwise
func (r *ReverseTunnel) Check() error {
	if strings.TrimSpace(r.DomainName) == "" {
		return trace.BadParameter("Reverse tunnel validation error: empty domain name")
	}
	if len(r.DialAddrs) == 0 {
		return trace.BadParameter("Invalid dial address for reverse tunnel '%v'", r.DomainName)
	}
	for _, addr := range r.DialAddrs {
		_, err := utils.ParseAddr(addr)
		if err != nil {
			return trace.Wrap(err)
		}
	}
	return nil
}
func ( r * ReverseTunnel ) Check ( ) error { if strings . TrimSpace ( r . DomainName ) == " " { return trace . BadParameter ( " " ) } if len ( r . DialAddrs ) == 0 { return trace . BadParameter ( " " , r . DomainName ) } for _ , addr := range r . DialAddrs { _ , err := utils . ParseAddr ( addr ) if err != nil { return trace . Wrap ( err ) } } return nil }
Check returns nil if all parameters are good, error otherwise
Check returns nil if all parameters are good error otherwise