Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 66 for newClient (0.14 sec)

  1. istioctl/pkg/metrics/metrics.go

    		}
    
    		printMetrics(c.OutOrStdout(), sm)
    	}
    	return nil
    }
    
    func prometheusAPI(address string) (promv1.API, error) {
    	promClient, err := api.NewClient(api.Config{Address: address})
    	if err != nil {
    		return nil, fmt.Errorf("could not build prometheus client: %v", err)
    	}
    	return promv1.NewAPI(promClient), nil
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sat Apr 13 05:23:38 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  2. staging/src/k8s.io/cli-runtime/pkg/resource/fallback_query_param_verifier_test.go

    				Group:   "",
    				Version: "v1",
    				Kind:    "List",
    			},
    			queryParam:       QueryParamFieldValidation,
    			expectedSupports: false,
    		},
    	}
    
    	root := openapi3.NewRoot(cached.NewClient(openapitest.NewEmbeddedFileClient()))
    	for tn, tc := range tests {
    		t.Run(tn, func(t *testing.T) {
    			primary := createFakeV3Verifier(tc.crds, root, tc.queryParam)
    			// secondary verifier should not be called.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 10 18:30:16 UTC 2023
    - 10.3K bytes
    - Viewed (0)
  3. pkg/kubelet/winstats/perfcounter_nodestats.go

    const allProcessorGroups = 0xFFFF
    
    // NewPerfCounterClient creates a client using perf counters
    func NewPerfCounterClient() (Client, error) {
    	// Initialize the cache
    	initCache := cpuUsageCoreNanoSecondsCache{0, 0}
    	return newClient(&perfCounterNodeStatsClient{
    		cpuUsageCoreNanoSecondsCache: initCache,
    	})
    }
    
    // perfCounterNodeStatsClient is a client that provides Windows Stats via PerfCounters
    type perfCounterNodeStatsClient struct {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jan 26 18:37:21 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  4. pkg/bootstrap/platform/gcp.go

    			success <- false
    			return
    		}
    		url := fmt.Sprintf("https://compute.googleapis.com/compute/v1/projects/%s/zones/%s/instances/%s", md[GCPProject], md[GCPLocation], md[GCEInstance])
    		resp, err := oauth2.NewClient(ctx, creds.TokenSource).Get(url)
    		if err != nil {
    			log.Warnf("unable to retrieve instance labels: %v", err)
    			success <- false
    			return
    
    		}
    		defer resp.Body.Close()
    		instance := &GcpInstance{}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Dec 15 00:37:33 UTC 2023
    - 11.1K bytes
    - Viewed (0)
  5. internal/logger/target/kafka/kafka.go

    	h.config = sconfig
    
    	var brokers []string
    	for _, broker := range h.kconfig.Brokers {
    		brokers = append(brokers, broker.String())
    	}
    
    	client, err := sarama.NewClient(brokers, sconfig)
    	if err != nil {
    		return err
    	}
    
    	producer, err := sarama.NewSyncProducerFromClient(client)
    	if err != nil {
    		return err
    	}
    	h.client = client
    	h.producer = producer
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Sun Jun 02 03:03:39 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  6. src/net/rpc/server_test.go

    }
    
    func (writeCrasher) Write(p []byte) (int, error) {
    	return 0, errors.New("fake write failure")
    }
    
    func TestClientWriteError(t *testing.T) {
    	w := &writeCrasher{done: make(chan bool)}
    	c := NewClient(w)
    	defer c.Close()
    
    	res := false
    	err := c.Call("foo", 1, &res)
    	if err == nil {
    		t.Fatal("expected error")
    	}
    	if err.Error() != "fake write failure" {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jul 18 05:23:29 UTC 2023
    - 19K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/ConnectionReuseTest.kt

      private lateinit var server: MockWebServer
      private val handshakeCertificates = platform.localhostHandshakeCertificates()
      private var client: OkHttpClient = clientTestRule.newClient()
    
      @BeforeEach
      fun setUp(server: MockWebServer) {
        this.server = server
      }
    
      @Test
      fun connectionsAreReused() {
        server.enqueue(MockResponse(body = "a"))
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 12.3K bytes
    - Viewed (0)
  8. tools/bug-report/pkg/content/content.go

    	out := make(map[string]string)
    	sa := local.NewSourceAnalyzer(analyzers.AllCombined(), resource.Namespace(p.Namespace), resource.Namespace(p.IstioNamespace), nil)
    
    	k, err := kube.NewClient(kube.NewClientConfigForRestConfig(p.Runner.Client.RESTConfig()), "")
    	if err != nil {
    		return nil, err
    	}
    	k = kube.EnableCrdWatcher(k)
    	sa.AddRunningKubeSource(k)
    
    	cancel := make(chan struct{})
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Dec 05 18:47:53 UTC 2023
    - 9.7K bytes
    - Viewed (0)
  9. src/runtime/pprof/pprof.go

    // trace in the function calling Add. For example, given this
    // execution stack:
    //
    //	Add
    //	called from rpc.NewClient
    //	called from mypkg.Run
    //	called from main.main
    //
    // Passing skip=0 begins the stack trace at the call to Add inside rpc.NewClient.
    // Passing skip=1 begins the stack trace at the call to NewClient inside mypkg.Run.
    func (p *Profile) Add(value any, skip int) {
    	if p.name == "" {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:52:17 UTC 2024
    - 30.6K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/mod/sumdb/client.go

    	latestMsg []byte    // encoded signed note for latest
    
    	tileSavedMu sync.Mutex
    	tileSaved   map[tlog.Tile]bool // which tiles have been saved using c.ops.WriteCache already
    }
    
    // NewClient returns a new [Client] using the given [ClientOps].
    func NewClient(ops ClientOps) *Client {
    	return &Client{
    		ops: ops,
    	}
    }
    
    // init initializes the client (if not already initialized)
    // and returns any initialization error.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 08 17:50:49 UTC 2024
    - 19.1K bytes
    - Viewed (0)
Back to top