Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 675 for sortBy (0.24 sec)

  1. istioctl/pkg/util/handlers/handlers.go

    	}
    	// We need to pass in a sorter, and the one used by `kubectl logs` is good enough.
    	sortBy := func(pods []*corev1.Pod) sort.Interface { return podutils.ByLogging(pods) }
    	timeout := 2 * time.Second
    	if getFirstPodFunc == nil {
    		getFirstPodFunc = polymorphichelpers.GetFirstPod
    	}
    	pod, _, err := getFirstPodFunc(client, namespace, selector, timeout, sortBy)
    	if err != nil {
    Go
    - Registered: Wed Apr 10 22:53:08 GMT 2024
    - Last Modified: Tue Feb 06 15:01:41 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  2. cni/pkg/repair/repair_test.go

    			go c.Run(stop)
    			kube.WaitForCacheSync("test", stop, c.queue.HasSynced)
    
    			assert.EventuallyEqual(t, func() map[string]string {
    				havePods := c.pods.List(metav1.NamespaceAll, klabels.Everything())
    				slices.SortBy(havePods, func(a *corev1.Pod) string {
    					return a.Name
    				})
    				return makePodLabelMap(havePods)
    			}, tt.wantLabels)
    			if tt.wantCount > 0 {
    Go
    - Registered: Wed Apr 10 22:53:08 GMT 2024
    - Last Modified: Tue Oct 24 03:31:28 GMT 2023
    - 10.6K bytes
    - Viewed (0)
  3. istioctl/pkg/kubeinject/kubeinject.go

    func GetFirstPod(client v1.CoreV1Interface, namespace string, selector string) (*corev1.Pod, error) {
    	options := metav1.ListOptions{LabelSelector: selector}
    
    	sortBy := func(pods []*corev1.Pod) sort.Interface { return sort.Reverse(podutils.ActivePods(pods)) }
    	podList, err := client.Pods(namespace).List(context.TODO(), options)
    	if err != nil {
    		return nil, err
    	}
    Go
    - Registered: Wed Apr 10 22:53:08 GMT 2024
    - Last Modified: Fri Mar 29 02:29:02 GMT 2024
    - 21.6K bytes
    - Viewed (0)
  4. istioctl/pkg/util/handlers/handlers_test.go

    				return nil, fmt.Errorf("unexpected request")
    			}
    		}),
    	}
    	getFirstPodFunc = func(client corev1client.PodsGetter, namespace string, selector string, timeout time.Duration, sortBy func([]*corev1.Pod) sort.Interface) (
    		*corev1.Pod, int, error,
    	) {
    		return attachPod(namespace), 1, nil
    	}
    	for _, tt := range tests {
    		t.Run(strings.Split(tt.name, ".")[0], func(t *testing.T) {
    Go
    - Registered: Wed Apr 10 22:53:08 GMT 2024
    - Last Modified: Fri Jun 09 18:17:49 GMT 2023
    - 6.6K bytes
    - Viewed (0)
  5. guava-testlib/src/com/google/common/collect/testing/TestIntegerSortedSetGenerator.java

    /**
     * Create integer sets for testing collections that are sorted by natural ordering.
     *
     * @author Chris Povirk
     * @author Jared Levy
     */
    @GwtCompatible
    @ElementTypesAreNonnullByDefault
    public abstract class TestIntegerSortedSetGenerator extends TestIntegerSetGenerator {
      @Override
      protected abstract SortedSet<Integer> create(Integer[] elements);
    
      /** Sorts the elements by their natural ordering. */
      @Override
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 1.3K bytes
    - Viewed (0)
  6. guava-testlib/src/com/google/common/collect/testing/TestStringSortedSetGenerator.java

        return (SortedSet<String>) super.create(elements);
      }
    
      @Override
      protected abstract SortedSet<String> create(String[] elements);
    
      /** Sorts the elements by their natural ordering. */
      @Override
      public List<String> order(List<String> insertionOrder) {
        Collections.sort(insertionOrder);
        return insertionOrder;
      }
    
      @Override
      public String belowSamplesLesser() {
        return "!! a";
      }
    
      @Override
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  7. android/guava-testlib/src/com/google/common/collect/testing/TestIntegerSortedSetGenerator.java

    /**
     * Create integer sets for testing collections that are sorted by natural ordering.
     *
     * @author Chris Povirk
     * @author Jared Levy
     */
    @GwtCompatible
    @ElementTypesAreNonnullByDefault
    public abstract class TestIntegerSortedSetGenerator extends TestIntegerSetGenerator {
      @Override
      protected abstract SortedSet<Integer> create(Integer[] elements);
    
      /** Sorts the elements by their natural ordering. */
      @Override
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 1.3K bytes
    - Viewed (0)
  8. android/guava-testlib/src/com/google/common/collect/testing/TestStringSortedSetGenerator.java

        return (SortedSet<String>) super.create(elements);
      }
    
      @Override
      protected abstract SortedSet<String> create(String[] elements);
    
      /** Sorts the elements by their natural ordering. */
      @Override
      public List<String> order(List<String> insertionOrder) {
        Collections.sort(insertionOrder);
        return insertionOrder;
      }
    
      @Override
      public String belowSamplesLesser() {
        return "!! a";
      }
    
      @Override
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  9. maven-core/src/main/java/org/apache/maven/graph/DefaultProjectDependencyGraph.java

            this.sorter = new ProjectSorter(projects);
            this.order = new HashMap<>();
            this.projects = new HashMap<>();
            List<MavenProject> sorted = this.sorter.getSortedProjects();
            for (int index = 0; index < sorted.size(); index++) {
                MavenProject project = sorted.get(index);
                String id = ProjectSorter.getId(project);
    Java
    - Registered: Sun Apr 14 03:35:08 GMT 2024
    - Last Modified: Fri Sep 22 06:02:04 GMT 2023
    - 5.8K bytes
    - Viewed (0)
  10. internal/kms/context.go

    // provided when decrypting an encrypted DEK.
    type Context map[string]string
    
    // MarshalText returns a canonical text representation of
    // the Context.
    
    // MarshalText sorts the context keys and writes the sorted
    // key-value pairs as canonical JSON object. The sort order
    // is based on the un-escaped keys. It never returns an error.
    func (c Context) MarshalText() ([]byte, error) {
    	if len(c) == 0 {
    		return []byte{'{', '}'}, nil
    	}
    
    Go
    - Registered: Sun Apr 07 19:28:10 GMT 2024
    - Last Modified: Sun Jan 02 17:15:06 GMT 2022
    - 6K bytes
    - Viewed (0)
Back to top