Skip to content

Commit

Permalink
events: remove memory eventer
Browse files Browse the repository at this point in the history
This type is unsused, undocumented and basically broken. If this would
be used anywhere it will just deadlock after writing 100+ events without
reading as the channel will just be full.

It was added in commit 8da5f3f but never used there nor is there any
justification why this was added in the commit message or PR comments.

Signed-off-by: Paul Holzinger <[email protected]>
  • Loading branch information
Luap99 committed Nov 1, 2024
1 parent 6348778 commit e3abf5c
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 59 deletions.
2 changes: 0 additions & 2 deletions libpod/events/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ const (
Journald EventerType = iota
// Null is a no-op events logger. It does not read or write events.
Null EventerType = iota
// Memory indicates the event logger will hold events in memory
Memory EventerType = iota
)

// Event describes the attributes of a libpod event
Expand Down
4 changes: 0 additions & 4 deletions libpod/events/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ func (et EventerType) String() string {
return "file"
case Journald:
return "journald"
case Memory:
return "memory"
case Null:
return "none"
default:
Expand All @@ -36,8 +34,6 @@ func IsValidEventer(eventer string) bool {
return true
case Journald.String():
return true
case Memory.String():
return true
case Null.String():
return true
default:
Expand Down
2 changes: 0 additions & 2 deletions libpod/events/events_freebsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ func NewEventer(options EventerOptions) (Eventer, error) {
return EventLogFile{options}, nil
case strings.ToUpper(Null.String()):
return newNullEventer(), nil
case strings.ToUpper(Memory.String()):
return NewMemoryEventer(), nil
default:
return nil, fmt.Errorf("unknown event logger type: %s", strings.ToUpper(options.EventerType))
}
Expand Down
2 changes: 0 additions & 2 deletions libpod/events/events_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ func NewEventer(options EventerOptions) (Eventer, error) {
return newLogFileEventer(options)
case strings.ToUpper(Null.String()):
return newNullEventer(), nil
case strings.ToUpper(Memory.String()):
return NewMemoryEventer(), nil
default:
return nil, fmt.Errorf("unknown event logger type: %s", strings.ToUpper(options.EventerType))
}
Expand Down
49 changes: 0 additions & 49 deletions libpod/events/memory.go

This file was deleted.

0 comments on commit e3abf5c

Please sign in to comment.