blob: 68350ba144a411a1c251b066d93fe9b59d0ad538 [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 Simsa519c5072014-09-17 21:37:57 -07007 "veyron.io/veyron/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}