diff --git a/pkg/audit/types.go b/pkg/audit/types.go index f1b7cef54..dbf03b0f5 100644 --- a/pkg/audit/types.go +++ b/pkg/audit/types.go @@ -39,4 +39,7 @@ type Backend interface { // events are delivered. It can be assumed that this method is called after // the stopCh channel passed to the Run method has been closed. Shutdown() + + // Returns the backend PluginName. + String() string } diff --git a/pkg/audit/union_test.go b/pkg/audit/union_test.go index 45fd67100..3d474a474 100644 --- a/pkg/audit/union_test.go +++ b/pkg/audit/union_test.go @@ -40,6 +40,10 @@ func (f *fakeBackend) Shutdown() { // Nothing to do here. } +func (f *fakeBackend) String() string { + return "" +} + func TestUnion(t *testing.T) { backends := []Backend{ new(fakeBackend), diff --git a/plugin/pkg/audit/fake/fake.go b/plugin/pkg/audit/fake/fake.go index 4b8fa3c7c..a886529ec 100644 --- a/plugin/pkg/audit/fake/fake.go +++ b/plugin/pkg/audit/fake/fake.go @@ -44,3 +44,7 @@ func (b *Backend) ProcessEvents(ev ...*auditinternal.Event) { b.OnRequest(ev) } } + +func (b *Backend) String() string { + return "" +}