Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for EventString (0.16 sec)

  1. staging/src/k8s.io/apiserver/pkg/audit/format.go

    */
    
    package audit
    
    import (
    	"fmt"
    	"strconv"
    	"strings"
    	"time"
    
    	auditinternal "k8s.io/apiserver/pkg/apis/audit"
    )
    
    // EventString creates a 1-line text representation of an audit event, using a subset of the
    // information in the event struct.
    func EventString(ev *auditinternal.Event) string {
    	username := "<none>"
    	groups := "<none>"
    	if len(ev.User.Username) > 0 {
    		username = ev.User.Username
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Feb 25 12:23:51 UTC 2021
    - 2.1K bytes
    - Viewed (0)
  2. src/internal/trace/order.go

    	state, ok := o.pStates[curCtx.P]
    	if !ok {
    		return curCtx, false, fmt.Errorf("event %s for proc (%v) that doesn't exist", go122.EventString(ev.typ), curCtx.P)
    	}
    	if state.status != go122.ProcRunning && state.status != go122.ProcSyscall {
    		return curCtx, false, fmt.Errorf("%s event for proc that's not %s or %s", go122.EventString(ev.typ), go122.ProcRunning, go122.ProcSyscall)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 03 14:56:25 UTC 2024
    - 52.4K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/plugin/pkg/audit/log/backend.go

    		success = b.logEvent(ev) && success
    	}
    	return success
    }
    
    func (b *backend) logEvent(ev *auditinternal.Event) bool {
    	line := ""
    	switch b.format {
    	case FormatLegacy:
    		line = audit.EventString(ev) + "\n"
    	case FormatJson:
    		bs, err := runtime.Encode(b.encoder, ev)
    		if err != nil {
    			audit.HandlePluginError(PluginName, err, ev)
    			return false
    		}
    		line = string(bs[:])
    	default:
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Oct 03 14:38:47 UTC 2019
    - 2.4K bytes
    - Viewed (0)
  4. src/internal/trace/event.go

    	case go122.EvHeapGoal:
    		m.Name = "/gc/heap/goal:bytes"
    		m.Value = Value{kind: ValueUint64, scalar: e.base.args[0]}
    	default:
    		panic(fmt.Sprintf("internal error: unexpected event type for Metric kind: %s", go122.EventString(e.base.typ)))
    	}
    	return m
    }
    
    // Label returns details about a Label event.
    //
    // Panics if Kind != EventLabel.
    func (e Event) Label() Label {
    	if e.Kind() != EventLabel {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 12:39:00 UTC 2024
    - 28.9K bytes
    - Viewed (0)
  5. src/internal/trace/batch.go

    	if err != nil {
    		return batch{}, 0, err
    	}
    	if typ := event.Type(b); typ != go122.EvEventBatch && typ != go122.EvExperimentalBatch {
    		return batch{}, 0, fmt.Errorf("expected batch event, got %s", go122.EventString(typ))
    	}
    
    	// Read the experiment of we have one.
    	exp := event.NoExperiment
    	if event.Type(b) == go122.EvExperimentalBatch {
    		e, err := r.ReadByte()
    		if err != nil {
    			return batch{}, 0, err
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/audit/metrics.go

    	// Log the audit events to the debug log.
    	msg := fmt.Sprintf("Error in audit plugin '%s' affecting %d audit events: %v\nImpacted events:\n",
    		plugin, len(impacted), err)
    	for _, ev := range impacted {
    		msg = msg + EventString(ev) + "\n"
    	}
    	klog.Error(msg)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 13 00:46:24 UTC 2021
    - 3.6K bytes
    - Viewed (0)
  7. src/internal/trace/event/go122/event.go

    	EvGoroutineStack      // stack exists [timestamp, id, order]
    	EvGoroutineStackAlloc // stack alloc [timestamp, id, order]
    	EvGoroutineStackFree  // stack free [timestamp, id]
    )
    
    // EventString returns the name of a Go 1.22 event.
    func EventString(typ event.Type) string {
    	if int(typ) < len(specs) {
    		return specs[typ].Name
    	}
    	return fmt.Sprintf("Invalid(%d)", typ)
    }
    
    func Specs() []event.Spec {
    	return specs[:]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 14.8K bytes
    - Viewed (0)
Back to top