mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 21:47:07 +00:00
Merge pull request #100969 from enj/enj/i/audit_stage_const
audit: make stage consts use correct type
This commit is contained in:
commit
2ec888b2d0
@ -62,15 +62,15 @@ type Stage string
|
|||||||
const (
|
const (
|
||||||
// The stage for events generated as soon as the audit handler receives the request, and before it
|
// The stage for events generated as soon as the audit handler receives the request, and before it
|
||||||
// is delegated down the handler chain.
|
// is delegated down the handler chain.
|
||||||
StageRequestReceived = "RequestReceived"
|
StageRequestReceived Stage = "RequestReceived"
|
||||||
// The stage for events generated once the response headers are sent, but before the response body
|
// The stage for events generated once the response headers are sent, but before the response body
|
||||||
// is sent. This stage is only generated for long-running requests (e.g. watch).
|
// is sent. This stage is only generated for long-running requests (e.g. watch).
|
||||||
StageResponseStarted = "ResponseStarted"
|
StageResponseStarted Stage = "ResponseStarted"
|
||||||
// The stage for events generated once the response body has been completed, and no more bytes
|
// The stage for events generated once the response body has been completed, and no more bytes
|
||||||
// will be sent.
|
// will be sent.
|
||||||
StageResponseComplete = "ResponseComplete"
|
StageResponseComplete Stage = "ResponseComplete"
|
||||||
// The stage for events generated when a panic occurred.
|
// The stage for events generated when a panic occurred.
|
||||||
StagePanic = "Panic"
|
StagePanic Stage = "Panic"
|
||||||
)
|
)
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
|
@ -55,15 +55,15 @@ type Stage string
|
|||||||
const (
|
const (
|
||||||
// The stage for events generated as soon as the audit handler receives the request, and before it
|
// The stage for events generated as soon as the audit handler receives the request, and before it
|
||||||
// is delegated down the handler chain.
|
// is delegated down the handler chain.
|
||||||
StageRequestReceived = "RequestReceived"
|
StageRequestReceived Stage = "RequestReceived"
|
||||||
// The stage for events generated once the response headers are sent, but before the response body
|
// The stage for events generated once the response headers are sent, but before the response body
|
||||||
// is sent. This stage is only generated for long-running requests (e.g. watch).
|
// is sent. This stage is only generated for long-running requests (e.g. watch).
|
||||||
StageResponseStarted = "ResponseStarted"
|
StageResponseStarted Stage = "ResponseStarted"
|
||||||
// The stage for events generated once the response body has been completed, and no more bytes
|
// The stage for events generated once the response body has been completed, and no more bytes
|
||||||
// will be sent.
|
// will be sent.
|
||||||
StageResponseComplete = "ResponseComplete"
|
StageResponseComplete Stage = "ResponseComplete"
|
||||||
// The stage for events generated when a panic occurred.
|
// The stage for events generated when a panic occurred.
|
||||||
StagePanic = "Panic"
|
StagePanic Stage = "Panic"
|
||||||
)
|
)
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
|
@ -62,15 +62,15 @@ type Stage string
|
|||||||
const (
|
const (
|
||||||
// The stage for events generated as soon as the audit handler receives the request, and before it
|
// The stage for events generated as soon as the audit handler receives the request, and before it
|
||||||
// is delegated down the handler chain.
|
// is delegated down the handler chain.
|
||||||
StageRequestReceived = "RequestReceived"
|
StageRequestReceived Stage = "RequestReceived"
|
||||||
// The stage for events generated once the response headers are sent, but before the response body
|
// The stage for events generated once the response headers are sent, but before the response body
|
||||||
// is sent. This stage is only generated for long-running requests (e.g. watch).
|
// is sent. This stage is only generated for long-running requests (e.g. watch).
|
||||||
StageResponseStarted = "ResponseStarted"
|
StageResponseStarted Stage = "ResponseStarted"
|
||||||
// The stage for events generated once the response body has been completed, and no more bytes
|
// The stage for events generated once the response body has been completed, and no more bytes
|
||||||
// will be sent.
|
// will be sent.
|
||||||
StageResponseComplete = "ResponseComplete"
|
StageResponseComplete Stage = "ResponseComplete"
|
||||||
// The stage for events generated when a panic occurred.
|
// The stage for events generated when a panic occurred.
|
||||||
StagePanic = "Panic"
|
StagePanic Stage = "Panic"
|
||||||
)
|
)
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
|
@ -55,15 +55,15 @@ type Stage string
|
|||||||
const (
|
const (
|
||||||
// The stage for events generated as soon as the audit handler receives the request, and before it
|
// The stage for events generated as soon as the audit handler receives the request, and before it
|
||||||
// is delegated down the handler chain.
|
// is delegated down the handler chain.
|
||||||
StageRequestReceived = "RequestReceived"
|
StageRequestReceived Stage = "RequestReceived"
|
||||||
// The stage for events generated once the response headers are sent, but before the response body
|
// The stage for events generated once the response headers are sent, but before the response body
|
||||||
// is sent. This stage is only generated for long-running requests (e.g. watch).
|
// is sent. This stage is only generated for long-running requests (e.g. watch).
|
||||||
StageResponseStarted = "ResponseStarted"
|
StageResponseStarted Stage = "ResponseStarted"
|
||||||
// The stage for events generated once the response body has been completed, and no more bytes
|
// The stage for events generated once the response body has been completed, and no more bytes
|
||||||
// will be sent.
|
// will be sent.
|
||||||
StageResponseComplete = "ResponseComplete"
|
StageResponseComplete Stage = "ResponseComplete"
|
||||||
// The stage for events generated when a panic occurred.
|
// The stage for events generated when a panic occurred.
|
||||||
StagePanic = "Panic"
|
StagePanic Stage = "Panic"
|
||||||
)
|
)
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
|
@ -24,10 +24,10 @@ import (
|
|||||||
// AllStages returns all possible stages
|
// AllStages returns all possible stages
|
||||||
func AllStages() sets.String {
|
func AllStages() sets.String {
|
||||||
return sets.NewString(
|
return sets.NewString(
|
||||||
audit.StageRequestReceived,
|
string(audit.StageRequestReceived),
|
||||||
audit.StageResponseStarted,
|
string(audit.StageResponseStarted),
|
||||||
audit.StageResponseComplete,
|
string(audit.StageResponseComplete),
|
||||||
audit.StagePanic,
|
string(audit.StagePanic),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user