File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,17 +25,17 @@ import (
2525
2626 "github.com/containerd/cgroups/v3/cgroup1"
2727 eventstypes "github.com/containerd/containerd/api/events"
28+ "github.com/containerd/containerd/v2/core/events"
2829 "github.com/containerd/containerd/v2/core/runtime"
2930 "github.com/containerd/containerd/v2/pkg/oom"
30- "github.com/containerd/containerd/v2/pkg/shim"
3131 "github.com/containerd/containerd/v2/pkg/sys"
3232 "github.com/containerd/log"
3333 "golang.org/x/sys/unix"
3434)
3535
3636// New returns an epoll implementation that listens to OOM events
3737// from a container's cgroups.
38- func New (publisher shim .Publisher ) (oom.Watcher , error ) {
38+ func New (publisher events .Publisher ) (oom.Watcher , error ) {
3939 fd , err := unix .EpollCreate1 (unix .EPOLL_CLOEXEC )
4040 if err != nil {
4141 return nil , err
@@ -52,7 +52,7 @@ type epoller struct {
5252 mu sync.Mutex
5353
5454 fd int
55- publisher shim .Publisher
55+ publisher events .Publisher
5656 set map [uintptr ]* item
5757}
5858
Original file line number Diff line number Diff line change @@ -24,15 +24,15 @@ import (
2424
2525 cgroupsv2 "github.com/containerd/cgroups/v3/cgroup2"
2626 eventstypes "github.com/containerd/containerd/api/events"
27+ "github.com/containerd/containerd/v2/core/events"
2728 "github.com/containerd/containerd/v2/core/runtime"
2829 "github.com/containerd/containerd/v2/pkg/oom"
29- "github.com/containerd/containerd/v2/pkg/shim"
3030 "github.com/containerd/log"
3131)
3232
3333// New returns an implementation that listens to OOM events
3434// from a container's cgroups.
35- func New (publisher shim .Publisher ) (oom.Watcher , error ) {
35+ func New (publisher events .Publisher ) (oom.Watcher , error ) {
3636 return & watcher {
3737 itemCh : make (chan item ),
3838 publisher : publisher ,
@@ -42,7 +42,7 @@ func New(publisher shim.Publisher) (oom.Watcher, error) {
4242// watcher implementation for handling OOM events from a container's cgroup
4343type watcher struct {
4444 itemCh chan item
45- publisher shim .Publisher
45+ publisher events .Publisher
4646}
4747
4848type item struct {
You can’t perform that action at this time.
0 commit comments