func (r *RemoteSysProbeUtil) GetConnections(clientID string) (*model.Connections, error) {
	req, err := http.NewRequest("GET", fmt.Sprintf("%s?client_id=%s", connectionsURL, clientID), nil)
	if err != nil {
		return nil, err
	}

	req.Header.Set("Accept", contentTypeProtobuf)
	resp, err := r.httpClient.Do(req)
	if err != nil {
		return nil, err
	}

	defer resp.Body.Close()

	if resp.StatusCode != http.StatusOK {
		return nil, fmt.Errorf("conn request failed: Probe Path %s, url: %s, status code: %d", r.path, connectionsURL, resp.StatusCode)
	}

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

	contentType := resp.Header.Get("Content-type")
	conns, err := netEncoding.GetUnmarshaler(contentType).Unmarshal(body)
	if err != nil {
		return nil, err
	}

	return conns, nil
}
// GetConnections returns a set of active network connections, retrieved from the system probe service
GetConnections returns a set of active network connections, retrieved from the system probe service
// GetConnections returns a set of active network connections retrieved from the system probe service
func (r *RemoteSysProbeUtil) GetConnections(clientID string) (*model.Connections, error) {
	req, err := http.NewRequest("GET", fmt.Sprintf("%s?client_id=%s", connectionsURL, clientID), nil)
	if err != nil {
		return nil, err
	}
	req.Header.Set("Accept", contentTypeProtobuf)
	resp, err := r.httpClient.Do(req)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()
	if resp.StatusCode != http.StatusOK {
		return nil, fmt.Errorf("conn request failed: Probe Path %s, url: %s, status code: %d", r.path, connectionsURL, resp.StatusCode)
	}
	body, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		return nil, err
	}
	contentType := resp.Header.Get("Content-type")
	conns, err := netEncoding.GetUnmarshaler(contentType).Unmarshal(body)
	if err != nil {
		return nil, err
	}
	return conns, nil
}
func ( r * RemoteSysProbeUtil ) GetConnections ( clientID string ) ( * model . Connections , error ) { req , err := http . NewRequest ( " " , fmt . Sprintf ( " " , connectionsURL , clientID ) , nil ) if err != nil { return nil , err } req . Header . Set ( " " , contentTypeProtobuf ) resp , err := r . httpClient . Do ( req ) if err != nil { return nil , err } defer resp . Body . Close ( ) if resp . StatusCode != http . StatusOK { return nil , fmt . Errorf ( " " , r . path , connectionsURL , resp . StatusCode ) } body , err := ioutil . ReadAll ( resp . Body ) if err != nil { return nil , err } contentType := resp . Header . Get ( " " ) conns , err := netEncoding . GetUnmarshaler ( contentType ) . Unmarshal ( body ) if err != nil { return nil , err } return conns , nil }
GetConnections returns a set of active network connections, retrieved from the system probe service
GetConnections returns a set of active network connections retrieved from the system probe service