Created
December 4, 2015 23:46
-
-
Save asim/dc6d7fded29f556ed1b6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"github.com/micro/go-micro/registry" | |
) | |
func main() { | |
w, err := registry.Watch() | |
if err != nil { | |
fmt.Println(err) | |
return | |
} | |
for { | |
r, err := w.Next() | |
if err != nil { | |
fmt.Println("err getting next:", err) | |
break | |
} | |
fmt.Printf("got next %+v %+v\n", r, r.Service) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment