package truncate
import "k8s.io/apiserver/plugin/pkg/audit/truncate"
Package truncate provides an implementation for the audit.Backend interface that truncates audit events and sends them to the delegate audit.Backend.
Index ¶
- Constants
- func NewBackend(delegateBackend audit.Backend, config Config, groupVersion schema.GroupVersion) audit.Backend
- type Config
Constants ¶
const ( // PluginName is the name reported in error metrics. PluginName = "truncate" )
Functions ¶
func NewBackend ¶
func NewBackend(delegateBackend audit.Backend, config Config, groupVersion schema.GroupVersion) audit.Backend
NewBackend returns a new truncating backend, using configuration passed in the parameters. Truncate backend automatically runs and shut downs the delegate backend.
Types ¶
type Config ¶
type Config struct { // MaxEventSize defines max allowed size of the event. If the event is larger, // truncating will be performed. MaxEventSize int64 // MaxBatchSize defined max allowed size of the batch of events, passed to the backend. // If the total size of the batch is larger than this number, batch will be split. Actual // size of the serialized request might be slightly higher, on the order of hundreds of bytes. MaxBatchSize int64 }
Config represents truncating backend configuration.
Source Files ¶
doc.go truncate.go
- Version
- v0.33.0 (latest)
- Published
- Apr 23, 2025
- Platform
- linux/amd64
- Imports
- 6 packages
- Last checked
- 1 hour ago –
Tools for package owners.