cgroups
cgroups copied to clipboard
MemoryThresholdEvent function incorrect return type
In the memory.go why does the MemoryThresholdEvent() function return a MemoryEvent and not a memoryThresholdEvent as the documentation above seems to suggest it would?
https://github.com/containerd/cgroups/blob/4cbc285b33272039927a0b066d3412799db8de14/memory.go#L36-L48
@AlvinKuruvilla Poor wording on my part. All of the Memory___Event
functions return a MemoryEvent
interface so they can all be registered via the memory controllers memoryEvent
method. I can push a fix to make this more clear (unless you already have a branch with a fix 😋).
Okay sounds good I will definitely try to get a PR for this soon I assume adding a little more details to all of the comments on each of the Memory___Event functions and the MemoryEvent interface is good enough?
Yep, that sounds perfect!
Just created a PR: #190 The CI tests seem to be failing though, not sure why.
Closed with https://github.com/containerd/cgroups/pull/266