Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 25 for func (0.05 sec)

  1. docs/debugging/inspect/utils.go

    		return x509.ParsePKCS1PrivateKey(dst[:n])
    	}
    	// Try Raw, return error
    	return x509.ParsePKCS1PrivateKey(priv)
    }
    
    func fatalErr(err error) {
    	if err == nil {
    		return
    	}
    	log.Fatalln(err)
    }
    
    func fatalIf(b bool, msg string, v ...interface{}) {
    	if !b {
    		return
    	}
    	log.Fatalf(msg, v...)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed Nov 02 20:36:38 UTC 2022
    - 1.4K bytes
    - Viewed (0)
  2. pkg/ctrlz/fw/utils.go

    	"net/http"
    )
    
    // RenderError outputs an error message
    func RenderError(w http.ResponseWriter, statusCode int, err error) {
    	w.WriteHeader(statusCode)
    	w.Header().Set("Content-Type", "text/plain; charset=utf-8")
    	_, _ = fmt.Fprintf(w, "%v", err)
    }
    
    // RenderHTML executes the given template, sending the output to the supplied response writer
    func RenderHTML(w http.ResponseWriter, t *template.Template, data any) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 24 14:06:41 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  3. cmd/kubeadm/app/util/staticpod/utils.go

    func getProbeAddress(addr string) string {
    	if addr == "0.0.0.0" || addr == "::" {
    		return ""
    	}
    	return addr
    }
    
    // GetUsersAndGroups returns the local usersAndGroups, but first creates it
    // in a thread safe way once.
    func GetUsersAndGroups() (*users.UsersAndGroups, error) {
    	var err error
    	usersAndGroupsOnce.Do(func() {
    		usersAndGroups, err = users.AddUsersAndGroups()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Jan 14 13:07:56 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  4. internal/logger/utils.go

    var ansiRE = regexp.MustCompile("(\x1b[^m]*m)")
    
    // Print ANSI Control escape
    func ansiEscape(format string, args ...interface{}) {
    	Esc := "\x1b"
    	fmt.Printf("%s%s", Esc, fmt.Sprintf(format, args...))
    }
    
    func ansiMoveRight(n int) {
    	if runtime.GOOS == "windows" {
    		return
    	}
    	if color.IsTerminal() {
    		ansiEscape("[%dC", n)
    	}
    }
    
    func ansiSaveAttributes() {
    	if runtime.GOOS == "windows" {
    		return
    	}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Aug 04 23:10:08 UTC 2022
    - 1.7K bytes
    - Viewed (0)
  5. pkg/controller/cronjob/utils.go

    }
    
    // getTimeHash returns Unix Epoch Time in minutes
    func getTimeHashInMinutes(scheduledTime time.Time) int64 {
    	return scheduledTime.Unix() / 60
    }
    
    // byJobStartTime sorts a list of jobs by start timestamp, using their names as a tie breaker.
    type byJobStartTime []*batchv1.Job
    
    func (o byJobStartTime) Len() int      { return len(o) }
    func (o byJobStartTime) Swap(i, j int) { o[i], o[j] = o[j], o[i] }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 09 03:34:25 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  6. pkg/scheduler/framework/plugins/nodevolumelimits/utils.go

    	"k8s.io/kubernetes/pkg/features"
    	"k8s.io/kubernetes/pkg/scheduler/framework"
    )
    
    // isCSIMigrationOn returns a boolean value indicating whether
    // the CSI migration has been enabled for a particular storage plugin.
    func isCSIMigrationOn(csiNode *storagev1.CSINode, pluginName string) bool {
    	if csiNode == nil || len(pluginName) == 0 {
    		return false
    	}
    
    	// In-tree storage to CSI driver migration feature should be enabled,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 09 14:55:34 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  7. pkg/scheduler/util/utils.go

    )
    
    // GetPodFullName returns a name that uniquely identifies a pod.
    func GetPodFullName(pod *v1.Pod) string {
    	// Use underscore as the delimiter because it is not allowed in pod name
    	// (DNS subdomain format).
    	return pod.Name + "_" + pod.Namespace
    }
    
    // GetPodStartTime returns start time of the given pod or current timestamp
    // if it hasn't started yet.
    func GetPodStartTime(pod *v1.Pod) *metav1.Time {
    	if pod.Status.StartTime != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Sep 21 01:40:44 UTC 2023
    - 6.2K bytes
    - Viewed (0)
  8. pkg/controller/job/util/utils.go

    // IsJobFinished checks whether the given Job has finished execution.
    // It does not discriminate between successful and failed terminations.
    func IsJobFinished(j *batch.Job) bool {
    	isFinished, _ := FinishedCondition(j)
    	return isFinished
    }
    
    // IsJobSucceeded returns whether a job has completed successfully.
    func IsJobSucceeded(j *batch.Job) bool {
    	for _, c := range j.Status.Conditions {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 07 09:27:46 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  9. cmd/kubeadm/app/preflight/utils.go

    	"strings"
    
    	"github.com/pkg/errors"
    
    	"k8s.io/apimachinery/pkg/util/version"
    	utilsexec "k8s.io/utils/exec"
    )
    
    // GetKubeletVersion is helper function that returns version of kubelet available in $PATH
    func GetKubeletVersion(execer utilsexec.Interface) (*version.Version, error) {
    	kubeletVersionRegex := regexp.MustCompile(`^\s*Kubernetes v((0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)([-\w.+]*)?)\s*$`)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 07 07:51:36 UTC 2022
    - 1.4K bytes
    - Viewed (0)
  10. utils/utils.go

    	"fmt"
    	"path/filepath"
    	"reflect"
    	"runtime"
    	"strconv"
    	"strings"
    	"unicode"
    )
    
    var gormSourceDir string
    
    func init() {
    	_, file, _, _ := runtime.Caller(0)
    	// compatible solution to get gorm source directory with various operating systems
    	gormSourceDir = sourceDir(file)
    }
    
    func sourceDir(file string) string {
    	dir := filepath.Dir(file)
    	dir = filepath.Dir(dir)
    
    	s := filepath.Dir(dir)
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Apr 22 06:43:02 UTC 2024
    - 3.8K bytes
    - Viewed (0)
Back to top