From 93f6c66c5ecd3e9240acf6491683e5b02ae0b9e9 Mon Sep 17 00:00:00 2001 From: Danny Canter Date: Wed, 4 Jan 2023 16:35:16 -0800 Subject: [PATCH] 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 --- cgroup1/memory.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cgroup1/memory.go b/cgroup1/memory.go index 484f9175..e84ec2b3 100644 --- a/cgroup1/memory.go +++ b/cgroup1/memory.go @@ -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{ @@ -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,