code: func DiscoverACIEndpoints(app App, hostHeaders map[string]http.Header, insecure InsecureOption, port uint) (ACIEndpoints, []FailedAttempt, error) {
  	testFn := func(pre string, dd *discoveryData, err error) error {
  		if len(dd.ACIEndpoints) != 0 {
  			return errEnough
  		}
  		return nil
  	}
  
  	attempts := []FailedAttempt{}
  	dd, err := DiscoverWalk(app, hostHeaders, insecure, port, walker(&attempts, testFn))
  	if err != nil && err != errEnough {
  		return nil, attempts, err
  	}
  
  	return dd.ACIEndpoints, attempts, nil
  }
docs: // DiscoverACIEndpoints will make HTTPS requests to find the ac-discovery meta
  // tags and optionally will use HTTP if insecure is set. hostHeaders
  // specifies the header to apply depending on the host (e.g. authentication).
  // It will not give up until it has exhausted the path or found an image
  // discovery. If port is 0, the default port will be used.