@@ -61,7 +61,7 @@ import (
6161 "github.com/docker/libnetwork/cluster"
6262 "github.com/docker/libnetwork/config"
6363 "github.com/docker/libnetwork/datastore"
64- "github.com/docker/libnetwork/diagnose "
64+ "github.com/docker/libnetwork/diagnostic "
6565 "github.com/docker/libnetwork/discoverapi"
6666 "github.com/docker/libnetwork/driverapi"
6767 "github.com/docker/libnetwork/drvregistry"
@@ -136,12 +136,12 @@ type NetworkController interface {
136136 // SetKeys configures the encryption key for gossip and overlay data path
137137 SetKeys (keys []* types.EncryptionKey ) error
138138
139- // StartDiagnose start the network diagnose mode
140- StartDiagnose (port int )
141- // StopDiagnose start the network diagnose mode
142- StopDiagnose ()
143- // IsDiagnoseEnabled returns true if the diagnose is enabled
144- IsDiagnoseEnabled () bool
139+ // StartDiagnostic start the network diagnostic mode
140+ StartDiagnostic (port int )
141+ // StopDiagnostic start the network diagnostic mode
142+ StopDiagnostic ()
143+ // IsDiagnosticEnabled returns true if the diagnostic is enabled
144+ IsDiagnosticEnabled () bool
145145}
146146
147147// NetworkWalker is a client provided function which will be used to walk the Networks.
@@ -176,7 +176,7 @@ type controller struct {
176176 agentStopDone chan struct {}
177177 keys []* types.EncryptionKey
178178 clusterConfigAvailable bool
179- DiagnoseServer * diagnose .Server
179+ DiagnosticServer * diagnostic .Server
180180 sync.Mutex
181181}
182182
@@ -188,16 +188,16 @@ type initializer struct {
188188// New creates a new instance of network controller.
189189func New (cfgOptions ... config.Option ) (NetworkController , error ) {
190190 c := & controller {
191- id : stringid .GenerateRandomID (),
192- cfg : config .ParseConfigOptions (cfgOptions ... ),
193- sandboxes : sandboxTable {},
194- svcRecords : make (map [string ]svcInfo ),
195- serviceBindings : make (map [serviceKey ]* service ),
196- agentInitDone : make (chan struct {}),
197- networkLocker : locker .New (),
198- DiagnoseServer : diagnose .New (),
191+ id : stringid .GenerateRandomID (),
192+ cfg : config .ParseConfigOptions (cfgOptions ... ),
193+ sandboxes : sandboxTable {},
194+ svcRecords : make (map [string ]svcInfo ),
195+ serviceBindings : make (map [serviceKey ]* service ),
196+ agentInitDone : make (chan struct {}),
197+ networkLocker : locker .New (),
198+ DiagnosticServer : diagnostic .New (),
199199 }
200- c .DiagnoseServer .Init ()
200+ c .DiagnosticServer .Init ()
201201
202202 if err := c .initStores (); err != nil {
203203 return nil , err
@@ -1307,27 +1307,27 @@ func (c *controller) Stop() {
13071307 osl .GC ()
13081308}
13091309
1310- // StartDiagnose start the network diagnose mode
1311- func (c * controller ) StartDiagnose (port int ) {
1310+ // StartDiagnostic start the network dias mode
1311+ func (c * controller ) StartDiagnostic (port int ) {
13121312 c .Lock ()
1313- if ! c .DiagnoseServer . IsDebugEnable () {
1314- c .DiagnoseServer . EnableDebug ("127.0.0.1" , port )
1313+ if ! c .DiagnosticServer . IsDiagnosticEnabled () {
1314+ c .DiagnosticServer . EnableDiagnostic ("127.0.0.1" , port )
13151315 }
13161316 c .Unlock ()
13171317}
13181318
1319- // StopDiagnose start the network diagnose mode
1320- func (c * controller ) StopDiagnose () {
1319+ // StopDiagnostic start the network dias mode
1320+ func (c * controller ) StopDiagnostic () {
13211321 c .Lock ()
1322- if c .DiagnoseServer . IsDebugEnable () {
1323- c .DiagnoseServer . DisableDebug ()
1322+ if c .DiagnosticServer . IsDiagnosticEnabled () {
1323+ c .DiagnosticServer . DisableDiagnostic ()
13241324 }
13251325 c .Unlock ()
13261326}
13271327
1328- // IsDiagnoseEnabled returns true if the diagnose is enabled
1329- func (c * controller ) IsDiagnoseEnabled () bool {
1328+ // IsDiagnosticEnabled returns true if the dias is enabled
1329+ func (c * controller ) IsDiagnosticEnabled () bool {
13301330 c .Lock ()
13311331 defer c .Unlock ()
1332- return c .DiagnoseServer . IsDebugEnable ()
1332+ return c .DiagnosticServer . IsDiagnosticEnabled ()
13331333}
0 commit comments