Search Options

Results per page
Sort
Preferred Languages
Advance

Results 101 - 110 of 579 for fmt (0.02 sec)

  1. cni/pkg/plugin/cnieventclient.go

    	if err != nil {
    		return fmt.Errorf("failed to send event request: %v", err)
    	}
    	defer response.Body.Close()
    
    	if response.StatusCode != http.StatusOK {
    		body, err := io.ReadAll(io.LimitReader(response.Body, 1024*1024))
    		if err != nil {
    			return fmt.Errorf("unable to push CNI event and failed to read body (status code %d): %v", response.StatusCode, err)
    		}
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Tue Jul 02 18:48:50 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  2. internal/event/target/mysql.go

    			return fmt.Errorf("unrecognized format")
    		}
    	}
    
    	if m.Table == "" {
    		return fmt.Errorf("table unspecified")
    	}
    
    	if m.DSN != "" {
    		if _, err := mysql.ParseDSN(m.DSN); err != nil {
    			return err
    		}
    	} else {
    		// Some fields need to be specified when DSN is unspecified
    		if m.Port == "" {
    			return fmt.Errorf("unspecified port")
    		}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  3. istioctl/pkg/util/formatting/formatter.go

    	}
    )
    
    // render turns a Message instance into a string with an option of colored bash output
    func render(m diag.Message, colorize bool) string {
    	return fmt.Sprintf("%s%v%s [%v]%s %s",
    		colorPrefix(m, colorize), m.Type.Level(), colorSuffix(colorize),
    		m.Type.Code(), m.Origin(), fmt.Sprintf(m.Type.Template(), m.Parameters...),
    	)
    }
    
    func colorPrefix(m diag.Message, colorize bool) string {
    	if !colorize {
    		return ""
    	}
    
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Tue Jul 11 02:41:45 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  4. cmd/callhome.go

    	}{Version: healthInfo.Version}
    
    	enc := json.NewEncoder(gzWriter)
    	if e := enc.Encode(header); e != nil {
    		internalLogIf(ctx, fmt.Errorf("Could not encode health info header: %w", e))
    		return nil
    	}
    
    	if e := enc.Encode(healthInfo); e != nil {
    		internalLogIf(ctx, fmt.Errorf("Could not encode health info: %w", e))
    		return nil
    	}
    
    	gzWriter.Flush()
    	gzWriter.Close()
    
    	return b.Bytes()
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 17 16:53:34 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  5. cni/pkg/nodeagent/cni-watcher.go

    		if !sleep.UntilContext(s.ctx, time.Duration(msInterval)*time.Millisecond) {
    			return nil, fmt.Errorf("aborted")
    		}
    	}
    	if err != nil {
    		return nil, fmt.Errorf("failed to get pod %s/%s: %v", namespace, name, err)
    	}
    
    	// This shouldn't happen - we only trigger this when a pod is added to ambient.
    	if ambientPod == nil {
    		return nil, fmt.Errorf("pod %s/%s is unexpectedly not enrolled in ambient", namespace, name)
    	}
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Tue Jul 02 18:48:50 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  6. internal/dsync/dsync_test.go

    	dm1st.Lock(id, source)
    
    	// Release lock after 10 seconds
    	go func() {
    		time.Sleep(5 * testDrwMutexAcquireTimeout)
    		// fmt.Println("Unlocking dm1")
    
    		dm1st.Unlock(context.Background())
    	}()
    
    	dm2nd.Lock(id, source)
    
    	// fmt.Printf("2nd lock obtained after 1st lock is released\n")
    	time.Sleep(testDrwMutexRefreshCallTimeout * 2)
    
    	dm2nd.Unlock(context.Background())
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Jun 19 14:35:19 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  7. internal/logger/target/testlogger/testlogger.go

    		case errorMessage:
    			logf = func(format string, args ...any) {
    				fmt.Fprintf(os.Stderr, format+"\n", args...)
    			}
    		case fatalMessage:
    			logf = func(format string, args ...any) {
    				fmt.Fprintf(os.Stderr, format+"\n", args...)
    			}
    			defer os.Exit(1)
    		default:
    			logf = func(format string, args ...any) {
    				fmt.Fprintf(os.Stdout, format+"\n", args...)
    			}
    		}
    	}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 4K bytes
    - Viewed (0)
  8. cmd/metrics-realtime.go

    		}
    		cm, err := c.Times(false)
    		if err != nil {
    			m.Errors = append(m.Errors, fmt.Sprintf("%s: %v (cpuTimes)", byHostName, err.Error()))
    		} else {
    			// not collecting per-cpu stats, so there will be only one element
    			if len(cm) == 1 {
    				m.Aggregated.CPU.TimesStat = &cm[0]
    			} else {
    				m.Errors = append(m.Errors, fmt.Sprintf("%s: Expected one CPU stat, got %d", byHostName, len(cm)))
    			}
    		}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Jun 01 05:16:24 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  9. istioctl/pkg/tag/tag.go

    			if len(args) == 0 {
    				return fmt.Errorf("must provide a tag for modification")
    			}
    			if len(args) > 1 {
    				return fmt.Errorf("must provide a single tag for creation")
    			}
    			return nil
    		},
    		RunE: func(cmd *cobra.Command, args []string) error {
    			kubeClient, err := ctx.CLIClient()
    			if err != nil {
    				return fmt.Errorf("failed to create Kubernetes client: %v", err)
    			}
    
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Mon Jul 22 15:40:30 UTC 2024
    - 16.5K bytes
    - Viewed (0)
  10. internal/grid/manager.go

    		writeErr(fmt.Errorf("unknown incoming host: %v", cReq.Host))
    		return
    	}
    	if time.Since(cReq.Time).Abs() > 5*time.Minute {
    		writeErr(fmt.Errorf("time difference too large between servers: %v", time.Since(cReq.Time).Abs()))
    		return
    	}
    	if err := m.authToken(cReq.Token); err != nil {
    		writeErr(fmt.Errorf("auth token: %w", err))
    		return
    	}
    
    	if debugPrint {
    		fmt.Printf("handler: Got Connect Req %+v\n", cReq)
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jul 29 18:10:04 UTC 2024
    - 10.6K bytes
    - Viewed (0)
Back to top