Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for SafeEncodeString (0.22 sec)

  1. staging/src/k8s.io/apimachinery/pkg/util/rand/rand.go

    			i++
    		}
    		randomInt63 >>= alphanumsIdxBits
    		remaining--
    	}
    	return string(b)
    }
    
    // SafeEncodeString encodes s using the same characters as rand.String. This reduces the chances of bad words and
    // ensures that strings generated from hash functions appear consistent throughout the API.
    func SafeEncodeString(s string) string {
    	r := make([]byte, len(s))
    	for i, b := range []rune(s) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Oct 11 11:02:01 UTC 2018
    - 3.5K bytes
    - Viewed (0)
  2. pkg/controller/history/controller_history.go

    	}
    	if revision.Data.Object != nil {
    		hashutil.DeepHashObject(hf, revision.Data.Object)
    	}
    	if probe != nil {
    		hf.Write([]byte(strconv.FormatInt(int64(*probe), 10)))
    	}
    	return rand.SafeEncodeString(fmt.Sprint(hf.Sum32()))
    }
    
    // SortControllerRevisions sorts revisions by their Revision.
    func SortControllerRevisions(revisions []*apps.ControllerRevision) {
    	sort.Stable(byRevision(revisions))
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 05 13:33:52 UTC 2021
    - 18.2K bytes
    - Viewed (0)
  3. pkg/controller/controller_utils.go

    		collisionCountBytes := make([]byte, 8)
    		binary.LittleEndian.PutUint32(collisionCountBytes, uint32(*collisionCount))
    		podTemplateSpecHasher.Write(collisionCountBytes)
    	}
    
    	return rand.SafeEncodeString(fmt.Sprint(podTemplateSpecHasher.Sum32()))
    }
    
    func AddOrUpdateLabelsOnNode(kubeClient clientset.Interface, nodeName string, labelsToUpdate map[string]string) error {
    	firstTry := true
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jan 12 15:34:44 UTC 2024
    - 47.6K bytes
    - Viewed (0)
Back to top