blob: a6fcfa0a416aeb0598ab04e0462da6f5246be6e6 [file] [log] [blame]
David Why Use Two When One Will Do Presottof6813ec2014-07-11 16:12:54 -07001package netconfig_test
2
3import (
4 "fmt"
5 "log"
6
Jiri Simsa764efb72014-12-25 20:57:03 -08007 "v.io/core/veyron/lib/netconfig"
David Why Use Two When One Will Do Presottof6813ec2014-07-11 16:12:54 -07008)
9
10func ExampleNetConfigWatcher() {
11 w, err := netconfig.NewNetConfigWatcher()
12 if err != nil {
13 log.Fatalf("oops: %s", err)
14 }
15 fmt.Println("Do something to your network. You should see one or more dings.")
16 for {
17 <-w.Channel()
18 fmt.Println("ding")
19 }
20}