Skip to content

Commit

Permalink
docker: improved networkState logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Tero Marttila committed Aug 12, 2016
1 parent 71b1bcd commit 8980779
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docker/networks.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ func (event networkEvent) State() networkState {

switch event.Action {
case "create":

case "connect", "disconnect":

case "destroy":
state.Exists = false
}
Expand All @@ -37,6 +39,10 @@ type networkState struct {
Exists bool
}

func (state networkState) String() string {
return fmt.Sprintf("exists=%v", state.Exists)
}

type Networks map[string]*docker.Network

func (networks Networks) clone() Networks {
Expand Down

0 comments on commit 8980779

Please sign in to comment.