summaryrefslogtreecommitdiff
path: root/libpod/state.go
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/state.go')
-rw-r--r--libpod/state.go13
1 files changed, 5 insertions, 8 deletions
diff --git a/libpod/state.go b/libpod/state.go
index 4b711bae9..21525107f 100644
--- a/libpod/state.go
+++ b/libpod/state.go
@@ -1,5 +1,7 @@
package libpod
+import "github.com/containers/podman/v3/libpod/network/types"
+
// State is a storage backend for libpod's current state.
// A State is only initialized once per instance of libpod.
// As such, initialization methods for State implementations may safely assume
@@ -99,14 +101,9 @@ type State interface {
AllContainers() ([]*Container, error)
// Get networks the container is currently connected to.
- GetNetworks(ctr *Container) ([]string, error)
- // Get network aliases for the given container in the given network.
- GetNetworkAliases(ctr *Container, network string) ([]string, error)
- // Get all network aliases for the given container.
- GetAllNetworkAliases(ctr *Container) (map[string][]string, error)
- // Add the container to the given network, adding the given aliases
- // (if present).
- NetworkConnect(ctr *Container, network string, aliases []string) error
+ GetNetworks(ctr *Container) (map[string]types.PerNetworkOptions, error)
+ // Add the container to the given network with the given options
+ NetworkConnect(ctr *Container, network string, opts types.PerNetworkOptions) error
// Remove the container from the given network, removing all aliases for
// the container in that network in the process.
NetworkDisconnect(ctr *Container, network string) error