func metadataResponse(endpoint string, respType string) ([]byte, error) {
	var resp []byte
	var err error
	client := &http.Client{
		Timeout: 2 * time.Second,
	}
	for i := 0; i < MaxRetries; i++ {
		resp, err = metadataResponseOnce(client, endpoint, respType)
		if err == nil {
			return resp, nil
		}
		// duration between retries
		time.Sleep(time.Second)
	}

	return nil, err
}
// metadataResponse returns metadata response with retries
metadataResponse returns metadata response with retries
// metadataResponse returns metadata response with retries
func metadataResponse(endpoint string, respType string) ([]byte, error) {
	var resp []byte
	var err error
	client := &http.Client{
		Timeout: 2 * time.Second,
	}
	for i := 0; i < MaxRetries; i++ {
		resp, err = metadataResponseOnce(client, endpoint, respType)
		if err == nil {
			return resp, nil
		}
		time.Sleep(time.Second)
	}
	return nil, err
}
func metadataResponse ( endpoint string , respType string ) ( [ ] byte , error ) { var resp [ ] byte var err error client := & http . Client { Timeout : 2 * time . Second , } for i := 0 ; i < MaxRetries ; i ++ { resp , err = metadataResponseOnce ( client , endpoint , respType ) if err == nil { return resp , nil } time . Sleep ( time . Second ) } return nil , err }
metadataResponse returns metadata response with retries
metadataResponse returns metadata response with retries
// duration between retries