Skip to content

Instantly share code, notes, and snippets.

@asim
Created December 4, 2015 23:46
Show Gist options
  • Save asim/dc6d7fded29f556ed1b6 to your computer and use it in GitHub Desktop.
Save asim/dc6d7fded29f556ed1b6 to your computer and use it in GitHub Desktop.
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