@@ -43,6 +43,7 @@ const PrivilegedLabel = "github.com/thediveo/whalewatcher/moby/privileged"
4343type MobyAPIClient interface {
4444 client.ContainerAPIClient
4545 client.SystemAPIClient
46+ NegotiateAPIVersion (ctx context.Context )
4647 DaemonHost () string
4748 Close () error
4849}
@@ -131,6 +132,9 @@ func (mw *MobyWatcher) Close() {
131132// List all the currently alive and kicking containers, but do not list any
132133// containers without any processes.
133134func (mw * MobyWatcher ) List (ctx context.Context ) ([]* whalewatcher.Container , error ) {
135+ // https://github.com/moby/moby/pull/42379
136+ mw .moby .NegotiateAPIVersion (ctx )
137+
134138 // Scan the currently available containers and take only the alive into
135139 // further consideration. This is a potentially lengthy operation, as we
136140 // need to inspect each potential candidate individually due to the way the
@@ -188,6 +192,9 @@ func (mw *MobyWatcher) Inspect(ctx context.Context, nameorid string) (*whalewatc
188192// in the lifecycle of containers getting born (=alive, as opposed to, say,
189193// "conceived") and die.
190194func (mw * MobyWatcher ) LifecycleEvents (ctx context.Context ) (<- chan engineclient.ContainerEvent , <- chan error ) {
195+ // https://github.com/moby/moby/pull/42379
196+ mw .moby .NegotiateAPIVersion (ctx )
197+
191198 cntreventstream := make (chan engineclient.ContainerEvent )
192199 cntrerrstream := make (chan error , 1 )
193200
0 commit comments