Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
d5f543eb
Commit
d5f543eb
authored
Jul 09, 2018
by
Marian Lobur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix truncating and buffering backends integration.
parent
68bea2f4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
buffered.go
...rc/k8s.io/apiserver/plugin/pkg/audit/buffered/buffered.go
+1
-0
truncate.go
...rc/k8s.io/apiserver/plugin/pkg/audit/truncate/truncate.go
+3
-3
No files found.
staging/src/k8s.io/apiserver/plugin/pkg/audit/buffered/buffered.go
View file @
d5f543eb
...
...
@@ -102,6 +102,7 @@ type bufferedBackend struct {
var
_
audit
.
Backend
=
&
bufferedBackend
{}
// NewBackend returns a buffered audit backend that wraps delegate backend.
// Buffered backend automatically runs and shuts down the delegate backend.
func
NewBackend
(
delegate
audit
.
Backend
,
config
BatchConfig
)
audit
.
Backend
{
var
throttle
flowcontrol
.
RateLimiter
if
config
.
ThrottleEnable
{
...
...
staging/src/k8s.io/apiserver/plugin/pkg/audit/truncate/truncate.go
View file @
d5f543eb
...
...
@@ -62,6 +62,7 @@ type backend struct {
var
_
audit
.
Backend
=
&
backend
{}
// NewBackend returns a new truncating backend, using configuration passed in the parameters.
// Truncate backend automatically runs and shut downs the delegate backend.
func
NewBackend
(
delegateBackend
audit
.
Backend
,
config
Config
,
groupVersion
schema
.
GroupVersion
)
audit
.
Backend
{
return
&
backend
{
delegateBackend
:
delegateBackend
,
...
...
@@ -128,12 +129,11 @@ func truncate(e *auditinternal.Event) *auditinternal.Event {
}
func
(
b
*
backend
)
Run
(
stopCh
<-
chan
struct
{})
error
{
// Nothing to do here
return
nil
return
b
.
delegateBackend
.
Run
(
stopCh
)
}
func
(
b
*
backend
)
Shutdown
()
{
// Nothing to do here
b
.
delegateBackend
.
Shutdown
()
}
func
(
b
*
backend
)
calcSize
(
e
*
auditinternal
.
Event
)
(
int64
,
error
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment