Skip to content

Commit

Permalink
Add status to discover.
Browse files Browse the repository at this point in the history
  • Loading branch information
barnybug committed Apr 3, 2016
1 parent 383f77b commit 4ca29fe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ func (c *Client) Device() string {
return c.info["md"]
}

func (c *Client) Status() string {
return c.info["rs"]
}

func (c *Client) String() string {
return fmt.Sprintf("%s - %s:%d", c.name, c.host, c.port)
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/cast/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ func discoverCommand(c *cli.Context) {
found := map[string]bool{}
for client := range discover.Found() {
if _, ok := found[client.Uuid()]; !ok {
fmt.Printf("Found: %s:%d '%s' (%s)\n", client.IP(), client.Port(), client.Name(), client.Device())
fmt.Printf("Found: %s:%d '%s' (%s) %s\n", client.IP(), client.Port(), client.Name(), client.Device(), client.Status())
found[client.Uuid()] = true
}
}
Expand Down

0 comments on commit 4ca29fe

Please # to comment.