code: func (p *Plugin) createClient() error {
  	network := "unix"
  	address := "/run/dcos/dcos-metrics-agent.sock"
  	if runtime.GOOS == "windows" {
  		network = "tcp"
  		address = "localhost:9000"
  	}
  	if p.Role == dcos.RoleMaster {
  		address = "/run/dcos/dcos-metrics-master.sock"
  	}
  
  	p.Log.Infof("Creating metrics API client via %s", address)
  
  	p.Client = &http.Client{
  		Transport: &http.Transport{
  			DialContext: func(_ context.Context, _, _ string) (net.Conn, error) {
  				return net.Dial(network, address)
  			},
  		},
  	}
  	return nil
  }
docs: // createClient creates an HTTP Client which uses the unix file socket
  // appropriate to the plugin's role