-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: refactor enricher for cross-platform compatibility and update d…
…ependencies
- Loading branch information
1 parent
fed6d36
commit 57093e8
Showing
9 changed files
with
62 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
// go:build !windows | ||
|
||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT license. | ||
package cmd | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT license. | ||
|
||
package enricher | ||
|
||
import ( | ||
"context" | ||
"sync" | ||
|
||
v1 "github.com/cilium/cilium/pkg/hubble/api/v1" | ||
"github.com/microsoft/retina/pkg/controllers/cache" | ||
) | ||
|
||
var ( | ||
e *Enricher | ||
once sync.Once | ||
initialized bool | ||
) | ||
|
||
type Enricher struct { | ||
} | ||
|
||
func New(ctx context.Context, cache cache.CacheInterface) *Enricher { | ||
once.Do(func() { | ||
e = &Enricher{} | ||
initialized = true | ||
}) | ||
return e | ||
} | ||
|
||
func Instance() *Enricher { | ||
return e | ||
} | ||
|
||
func IsInitialized() bool { | ||
return initialized | ||
} | ||
|
||
func (e *Enricher) Run() {} | ||
|
||
func (e *Enricher) Write(_ *v1.Event) {} | ||
|
||
func (e *Enricher) ExportReader() RingReaderInterface { return nil } |
2 changes: 1 addition & 1 deletion
2
pkg/enricher/mock_enricherinterface.go → pkg/enricher/mock_enricherinterface_linux.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.