2019-08-05 13:47:29 +00:00
|
|
|
package daemon
|
|
|
|
|
|
|
|
import (
|
|
|
|
"strings"
|
|
|
|
|
2021-04-06 00:24:47 +00:00
|
|
|
"github.com/docker/docker/libnetwork"
|
2019-08-05 13:47:29 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// getEndpointInNetwork returns the container's endpoint to the provided network.
|
|
|
|
func getEndpointInNetwork(name string, n libnetwork.Network) (libnetwork.Endpoint, error) {
|
|
|
|
endpointName := strings.TrimPrefix(name, "/")
|
|
|
|
return n.EndpointByName(endpointName)
|
|
|
|
}
|