func (c *CLCRunnerClient) GetRunnerStats(IP string) (types.CLCRunnersStats, error) {
	var stats types.CLCRunnersStats
	var err error

	rawURL := fmt.Sprintf("https://%s:%d/%s/%s", IP, c.clcRunnerPort, clcRunnerPath, clcRunnerStatsPath)

	req, err := http.NewRequest("GET", rawURL, nil)
	if err != nil {
		return stats, err
	}
	req.Header = c.clcRunnerAPIRequestHeaders

	resp, err := c.clcRunnerAPIClient.Do(req)
	if err != nil {
		return stats, err
	}
	defer resp.Body.Close()

	if resp.StatusCode != http.StatusOK {
		return stats, fmt.Errorf("unexpected status code from CLC runner: %d", resp.StatusCode)
	}

	body, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		return stats, err
	}

	err = json.Unmarshal(body, &stats)

	// clean stats map if it contains an empty entry
	delete(stats, "")

	return stats, err
}
// GetRunnerStats fetches the runner stats exposed by the Cluster Level Check Runner
GetRunnerStats fetches the runner stats exposed by the Cluster Level Check Runner
// GetRunnerStats fetches the runner stats exposed by the Cluster Level Check Runner
func (c *CLCRunnerClient) GetRunnerStats(IP string) (types.CLCRunnersStats, error) {
	var stats types.CLCRunnersStats
	var err error
	rawURL := fmt.Sprintf("https://%s:%d/%s/%s", IP, c.clcRunnerPort, clcRunnerPath, clcRunnerStatsPath)
	req, err := http.NewRequest("GET", rawURL, nil)
	if err != nil {
		return stats, err
	}
	req.Header = c.clcRunnerAPIRequestHeaders
	resp, err := c.clcRunnerAPIClient.Do(req)
	if err != nil {
		return stats, err
	}
	defer resp.Body.Close()
	if resp.StatusCode != http.StatusOK {
		return stats, fmt.Errorf("unexpected status code from CLC runner: %d", resp.StatusCode)
	}
	body, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		return stats, err
	}
	err = json.Unmarshal(body, &stats)
	delete(stats, "")
	return stats, err
}
func ( c * CLCRunnerClient ) GetRunnerStats ( IP string ) ( types . CLCRunnersStats , error ) { var stats types . CLCRunnersStats var err error rawURL := fmt . Sprintf ( " " , IP , c . clcRunnerPort , clcRunnerPath , clcRunnerStatsPath ) req , err := http . NewRequest ( " " , rawURL , nil ) if err != nil { return stats , err } req . Header = c . clcRunnerAPIRequestHeaders resp , err := c . clcRunnerAPIClient . Do ( req ) if err != nil { return stats , err } defer resp . Body . Close ( ) if resp . StatusCode != http . StatusOK { return stats , fmt . Errorf ( " " , resp . StatusCode ) } body , err := ioutil . ReadAll ( resp . Body ) if err != nil { return stats , err } err = json . Unmarshal ( body , & stats ) delete ( stats , " " ) return stats , err }
GetRunnerStats fetches the runner stats exposed by the Cluster Level Check Runner
GetRunnerStats fetches the runner stats exposed by the Cluster Level Check Runner
// clean stats map if it contains an empty entry