blob: cf99fc1961bdd4c161d3c3a46a369499d8a69309 [file] [log] [blame]
Cosmos Nicolaou6c6fa112014-08-19 13:22:33 -07001// +build ignore
2
3package main
4
5import (
6 "fmt"
7
8 "veyron2/config"
9 "veyron2/rt"
10
11 "veyron/profiles/net"
12)
13
14func main() {
15 r := rt.Init()
16 defer r.Cleanup()
17
18 ch := make(chan config.Setting, 10)
19 p := r.Publisher()
20 settings, err := p.ForkStream(net.StreamName, ch)
21 if err != nil {
22 r.Logger().Infof("failed to fork stream: %s", err)
23 }
24 for _, setting := range settings.Latest {
25 fmt.Println("Setting: ", setting)
26 }
27 for setting := range ch {
28 fmt.Println("Setting: ", setting)
29 }
30}