Skip to content

Commit

Permalink
Remove DB interface
Browse files Browse the repository at this point in the history
Remove the DB interface, as there will only be one implementation for it
  • Loading branch information
mjwolf committed Jan 17, 2024
1 parent f35b4c7 commit c9cf706
Show file tree
Hide file tree
Showing 5 changed files with 689 additions and 711 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func New(cfg *config.C) (beat.Processor, error) {

ctx := context.TODO()
reader := procfs.NewProcfsReader(*logger)
db := processdb.NewSimpleDB(reader, *logger)
db := processdb.NewDB(reader, *logger)

backfilledPIDs := db.ScrapeProcfs()
logger.Debugf("backfilled %d processes", len(backfilledPIDs))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ var (
func TestEnrich(t *testing.T) {
for _, tt := range enrichTests {
reader := procfs.NewMockReader()
db := processdb.NewSimpleDB(reader, *logger)
db := processdb.NewDB(reader, *logger)

for _, ev := range tt.mockProcesses {
err := db.InsertExec(ev)
Expand Down
Loading

0 comments on commit c9cf706

Please sign in to comment.