Skip to content

Commit

Permalink
remove unecessary interface indirection
Browse files Browse the repository at this point in the history
  • Loading branch information
efd6 committed May 10, 2023
1 parent 221dc10 commit 2226034
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions filebeat/input/journald/pkg/journalread/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,31 +40,20 @@ import (
type Reader struct {
log *logp.Logger
backoff backoff.Backoff
journal journal
journal *sdjournal.Journal
}

type canceler interface {
Done() <-chan struct{}
Err() error
}

type journal interface {
Close() error
Next() (uint64, error)
Wait(time.Duration) int
GetEntry() (*sdjournal.JournalEntry, error)
SeekHead() error
SeekTail() error
SeekRealtimeUsec(usec uint64) error
SeekCursor(string) error
}

// LocalSystemJournalID is the ID of the local system journal.
const localSystemJournalID = "LOCAL_SYSTEM_JOURNAL"

// NewReader creates a new Reader for an already opened journal. The reader assumed to take
// ownership of the journal, and needs to be closed.
func NewReader(log *logp.Logger, journal journal, backoff backoff.Backoff) *Reader {
func NewReader(log *logp.Logger, journal *sdjournal.Journal, backoff backoff.Backoff) *Reader {
return &Reader{log: log, journal: journal, backoff: backoff}
}

Expand Down

0 comments on commit 2226034

Please sign in to comment.