Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 439 for sortBy (0.2 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 24 22:53:08 GMT 2024
    - Last Modified: Tue Feb 06 15:01:41 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  2. 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 24 22:53:08 GMT 2024
    - Last Modified: Fri Mar 29 02:29:02 GMT 2024
    - 21.6K bytes
    - Viewed (0)
  3. istioctl/pkg/ztunnelconfig/ztunnelconfig.go

    		return types.NamespacedName{}, err
    	}
    	pods := slices.Reference(podsr.Items)
    	if len(pods) > 0 {
    		// 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) }
    		sort.Sort(sortBy(pods))
    		return config.NamespacedName(pods[0]), nil
    	}
    	return types.NamespacedName{}, fmt.Errorf("no pods found")
    }
    
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Mon Apr 22 15:39:28 GMT 2024
    - 22.2K bytes
    - Viewed (0)
  4. 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 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 1.3K bytes
    - Viewed (0)
  5. 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 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  6. 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 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 1.3K bytes
    - Viewed (0)
  7. 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 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  8. callbacks.go

    			if c.after == "*" && len(sorted) > 0 {
    				if curIdx := getRIndex(sorted, c.name); curIdx == -1 {
    					sorted = append(sorted, c.name)
    				}
    			} else if sortedIdx := getRIndex(sorted, c.after); sortedIdx != -1 {
    				if curIdx := getRIndex(sorted, c.name); curIdx == -1 {
    					// if after callback sorted, append current callback to last
    					sorted = append(sorted, c.name)
    				} else if curIdx < sortedIdx {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Mar 26 03:33:36 GMT 2024
    - 8.6K bytes
    - Viewed (1)
  9. android/guava/src/com/google/common/collect/Ordering.java

        if (k == 0 || !iterator.hasNext()) {
          return Collections.emptyList();
        } else if (k >= Integer.MAX_VALUE / 2) {
          // k is really large; just do a straightforward sorted-copy-and-sublist
          ArrayList<E> list = Lists.newArrayList(iterator);
          Collections.sort(list, this);
          if (list.size() > k) {
            list.subList(k, list.size()).clear();
          }
          list.trimToSize();
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 24 19:38:27 GMT 2024
    - 39.4K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/ImmutableSortedMap.java

      /**
       * Returns a builder that creates immutable sorted maps whose keys are ordered by their natural
       * ordering. The sorted maps use {@link Ordering#natural()} as the comparator.
       */
      public static <K extends Comparable<?>, V> Builder<K, V> naturalOrder() {
        return new Builder<>(Ordering.natural());
      }
    
      /**
       * Returns a builder that creates immutable sorted maps with an explicit comparator. If the
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 52.7K bytes
    - Viewed (0)
Back to top