Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for WrapReadWriter (0.25 sec)

  1. pkg/kube/kclient/clienttest/test_helpers.go

    	t.t.Helper()
    	err := t.c.Delete(name, namespace)
    	if err != nil {
    		t.t.Fatalf("delete %v/%v: %v", namespace, name, err)
    	}
    }
    
    // WrapReadWriter returns a client that calls t.Fatal on errors.
    // Reads may be cached or uncached, depending on the input client.
    func WrapReadWriter[T controllers.Object](t test.Failer, c kclient.ReadWriter[T]) TestClient[T] {
    	return TestClient[T]{
    		c: c,
    		t: t,
    		TestWriter: TestWriter[T]{
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Feb 23 19:18:21 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  2. pkg/kube/kclient/clienttest/direct.go

    	return TestWriter[T]{t: t, c: kclient.NewWriteClient[T](c)}
    }
    
    // NewDirectClient returns a new client for the given type. Reads are directly to the API server.
    // Any errors will call t.Fatal.
    // Typically, clienttest.WrapReadWriter should be used to simply wrap an existing client when testing an informer.
    // However, NewDirectClient can be useful if we do not need/want an informer and need direct reads.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Aug 08 16:43:05 UTC 2023
    - 3K bytes
    - Viewed (0)
Back to top