Set session host
Add ping to L2 router
This commit is contained in:
@@ -33,6 +33,7 @@ type DockerApi interface {
|
||||
CreateNetwork(id string) error
|
||||
ConnectNetwork(container, network, ip string) (string, error)
|
||||
GetDaemonInfo() (types.Info, error)
|
||||
GetDaemonHost() string
|
||||
GetSwarmPorts() ([]string, []uint16, error)
|
||||
GetPorts() ([]uint16, error)
|
||||
GetContainerStats(name string) (io.ReadCloser, error)
|
||||
@@ -102,6 +103,10 @@ func (d *docker) GetDaemonInfo() (types.Info, error) {
|
||||
return d.c.Info(context.Background())
|
||||
}
|
||||
|
||||
func (d *docker) GetDaemonHost() string {
|
||||
return d.c.DaemonHost()
|
||||
}
|
||||
|
||||
func (d *docker) GetSwarmPorts() ([]string, []uint16, error) {
|
||||
hosts := []string{}
|
||||
ports := []uint16{}
|
||||
|
||||
@@ -28,6 +28,11 @@ func (m *Mock) GetDaemonInfo() (types.Info, error) {
|
||||
return args.Get(0).(types.Info), args.Error(1)
|
||||
}
|
||||
|
||||
func (m *Mock) GetDaemonHost() string {
|
||||
args := m.Called()
|
||||
return args.String(0)
|
||||
}
|
||||
|
||||
func (m *Mock) GetSwarmPorts() ([]string, []uint16, error) {
|
||||
args := m.Called()
|
||||
return args.Get(0).([]string), args.Get(1).([]uint16), args.Error(2)
|
||||
|
||||
Reference in New Issue
Block a user