Skip to content

Commit

Permalink
cg1: Clarify MemoryEvent comments
Browse files Browse the repository at this point in the history
Clarify that some of the functions in the cgroup1 package
return MemoryEvent interfaces and not internal types.

Signed-off-by: Danny Canter <danny@dcantah.dev>
  • Loading branch information
dcantah committed Jan 5, 2023
1 parent fc3b020 commit 93f6c66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cgroup1/memory.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ type memoryThresholdEvent struct {
swap bool
}

// MemoryThresholdEvent returns a new memory threshold event to be used with RegisterMemoryEvent.
// MemoryThresholdEvent returns a new [MemoryEvent] representing the memory threshold set.
// If swap is true, the event will be registered using memory.memsw.usage_in_bytes
func MemoryThresholdEvent(threshold uint64, swap bool) MemoryEvent {
return &memoryThresholdEvent{
Expand Down Expand Up @@ -83,7 +83,7 @@ type memoryPressureEvent struct {
hierarchy EventNotificationMode
}

// MemoryPressureEvent returns a new memory pressure event to be used with RegisterMemoryEvent.
// MemoryPressureEvent returns a new [MemoryEvent] representing the memory pressure set.
func MemoryPressureEvent(pressureLevel MemoryPressureLevel, hierarchy EventNotificationMode) MemoryEvent {
return &memoryPressureEvent{
pressureLevel,
Expand Down

0 comments on commit 93f6c66

Please sign in to comment.