Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for withAudit (0.17 sec)

  1. staging/src/k8s.io/apiserver/pkg/admission/audit_test.go

    		ac := audit.AuditContextFrom(ctx)
    		ae := &ac.Event
    		ae.Level = auditinternal.LevelMetadata
    		auditHandler := WithAudit(handler)
    		a := attributes()
    
    		assert.Equal(t, handler.Handles(Create), auditHandler.Handles(Create), tcName+": WithAudit decorator should not effect the return value")
    
    		mutator, ok := handler.(MutationInterface)
    		require.True(t, ok)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 03 16:16:51 UTC 2023
    - 5.8K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/admission/audit.go

    var _ MutationInterface = &auditHandler{}
    var _ ValidationInterface = &auditHandler{}
    
    // WithAudit is a decorator for a admission phase. It saves annotations
    // of attribute into the audit event. Attributes passed to the Admit and
    // Validate function must be instance of privateAnnotationsGetter or
    // AnnotationsGetter, otherwise an error is returned.
    func WithAudit(i Interface) Interface {
    	if i == nil {
    		return i
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 29 00:03:53 UTC 2022
    - 2.8K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/endpoints/filters/audit.go

    	"k8s.io/apiserver/pkg/endpoints/responsewriter"
    )
    
    // WithAudit decorates a http.Handler with audit logging information for all the
    // requests coming to the server. Audit level is decided according to requests'
    // attributes and audit policy. Logs are emitted to the audit sink to
    // process events. If sink or audit policy is nil, no decoration takes place.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 03 16:16:51 UTC 2023
    - 8.6K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/admission/attributes.go

    	return record.oldObject
    }
    
    func (record *attributesRecord) GetUserInfo() user.Info {
    	return record.userInfo
    }
    
    // getAnnotations implements privateAnnotationsGetter.It's a private method used
    // by WithAudit decorator.
    func (record *attributesRecord) getAnnotations(maxLevel auditinternal.Level) map[string]string {
    	record.annotationsLock.RLock()
    	defer record.annotationsLock.RUnlock()
    
    	if record.annotations == nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Aug 07 17:53:14 UTC 2019
    - 6.2K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/audit/context.go

    // It is safe to call at most parts of request flow that come after WithAuditAnnotations.
    // The notable exception being that this function must not be called via a
    // defer statement (i.e. after ServeHTTP) in a handler that runs before WithAudit
    // as at that point the audit event has already been sent to the audit sink.
    // Handlers that are unaware of their position in the overall request flow should
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 03 16:16:51 UTC 2023
    - 6.1K bytes
    - Viewed (0)
  6. manifests/addons/dashboards/lib/panels.libsonnet

          + timeSeries.standardOptions.withUnit('short')
          + timeSeries.standardOptions.withDecimals(0),
    
        seconds(title, targets, desc=''):
          self.base(title, targets, desc)
          + timeSeries.standardOptions.withUnit('s'),
    
        connections(title, targets, desc=''):
          self.base(title, targets, desc)
          + timeSeries.standardOptions.withUnit('cps'),
    
        dns(title, targets, desc=''):
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Jun 12 20:46:28 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  7. pkg/monitoring/options.go

    type options struct {
    	enabledCondition func() bool
    	unit             Unit
    	name             string
    	description      string
    }
    
    // WithUnit provides configuration options for a new Metric, providing unit of measure
    // information for a new Metric.
    func WithUnit(unit Unit) Options {
    	return func(opts *options) {
    		opts.unit = unit
    	}
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 17 20:25:52 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  8. pkg/monitoring/example_gauge_test.go

    package monitoring_test
    
    import "istio.io/istio/pkg/monitoring"
    
    var pushLatency = monitoring.NewGauge(
    	"push_latency_seconds",
    	"Duration, measured in seconds, of the last push",
    	monitoring.WithUnit(monitoring.Seconds),
    )
    
    func ExampleNewGauge() {
    	// only the last recorded value (99.2) will be exported for this gauge
    	pushLatency.Record(77.3)
    	pushLatency.Record(22.8)
    	pushLatency.Record(99.2)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 17 20:25:52 UTC 2023
    - 994 bytes
    - Viewed (0)
  9. pkg/monitoring/example_distribution_test.go

    var (
    	method = monitoring.CreateLabel("method")
    
    	receivedBytes = monitoring.NewDistribution(
    		"received_bytes_total",
    		"Distribution of received bytes by method",
    		[]float64{10, 100, 1000, 10000},
    		monitoring.WithUnit(monitoring.Bytes),
    	)
    )
    
    func ExampleNewDistribution() {
    	receivedBytes.With(method.Value("/projects/1")).Record(458)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 17 20:25:52 UTC 2023
    - 995 bytes
    - Viewed (0)
  10. pkg/monitoring/distribution.go

    }
    
    var _ Metric = &distribution{}
    
    func newDistribution(o options) *distribution {
    	d, err := meter().Float64Histogram(o.name,
    		api.WithDescription(o.description),
    		api.WithUnit(string(o.unit)))
    	if err != nil {
    		log.Fatalf("failed to create distribution: %v", err)
    	}
    	r := &distribution{d: d}
    	r.baseMetric = baseMetric{
    		name: o.name,
    		rest: r,
    	}
    	return r
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 17 20:25:52 UTC 2023
    - 1.8K bytes
    - Viewed (0)
Back to top