code: func (l *LibcontainerBackend) discoverdDial(network, addr string) (net.Conn, error) {
  	host, _, err := net.SplitHostPort(addr)
  	if err != nil {
  		return nil, err
  	}
  	if strings.HasSuffix(host, ".discoverd") {
  		// ensure discoverd is configured
  		<-l.discoverdConfigured
  		// lookup the service and pick a random address
  		service := strings.TrimSuffix(host, ".discoverd")
  		addrs, err := l.discoverdClient.Service(service).Addrs()
  		if err != nil {
  			return nil, err
  		} else if len(addrs) == 0 {
  			return nil, fmt.Errorf("lookup %s: no such host", host)
  		}
  		addr = addrs[random.Math.Intn(len(addrs))]
  	}
  	return dialer.Default.Dial(network, addr)
  }
docs: // discoverdDial is a discoverd aware dialer which resolves a discoverd host to
  // an address using the configured discoverd client as the host is likely not
  // using discoverd to resolve DNS queries