mirror of
https://github.com/akvorado/akvorado.git
synced 2025-12-11 22:14:02 +01:00
29 lines
669 B
Go
29 lines
669 B
Go
// SPDX-FileCopyrightText: 2022 Free Mobile
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
//go:build linux
|
|
|
|
package conntrackfixer
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/moby/moby/client"
|
|
"github.com/ti-mo/conntrack"
|
|
)
|
|
|
|
// ConntrackConn is the part of conntrack.Conn we use
|
|
type ConntrackConn interface {
|
|
Close() error
|
|
Dump(opts *conntrack.DumpOptions) ([]conntrack.Flow, error)
|
|
Delete(f conntrack.Flow) error
|
|
}
|
|
|
|
// DockerClient is the part of docker.Client we use
|
|
type DockerClient interface {
|
|
client.ContainerAPIClient
|
|
client.SystemAPIClient
|
|
ServerVersion(ctx context.Context, options client.ServerVersionOptions) (client.ServerVersionResult, error)
|
|
Close() error
|
|
}
|