Skip to content

Commit 93f6c66

Browse files
committed
cg1: Clarify MemoryEvent comments
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>
1 parent fc3b020 commit 93f6c66

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cgroup1/memory.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ type memoryThresholdEvent struct {
4343
swap bool
4444
}
4545

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

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

0 commit comments

Comments
 (0)