diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-12-15 15:25:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-15 15:25:14 +0100 |
commit | 7dabcbd7bcf78f3b5d310ed547801106da382618 (patch) | |
tree | 7b92c3ca37025a833a0d9651afeb19ba7c903cc8 /libpod/state.go | |
parent | b01a421f3413ba01b2c189b82c8153bdbd2a05fb (diff) | |
parent | ef325bc8c4824537e4bfb21aa7e6114a6e5a8c09 (diff) | |
download | podman-7dabcbd7bcf78f3b5d310ed547801106da382618.tar.gz podman-7dabcbd7bcf78f3b5d310ed547801106da382618.tar.bz2 podman-7dabcbd7bcf78f3b5d310ed547801106da382618.zip |
Merge pull request #12534 from Luap99/network-db
network db rewrite
Diffstat (limited to 'libpod/state.go')
-rw-r--r-- | libpod/state.go | 13 |
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 |