Live video on the AT Protocol

Add shut down after 5s to the example.

+10
+10
pkg/iroh/iroh_test/main.go
··· 4 4 "crypto/rand" 5 5 "fmt" 6 6 "os" 7 + "time" 7 8 8 9 iroh "stream.place/streamplace/pkg/iroh/generated/iroh_streamplace" 9 10 _ "stream.place/streamplace/pkg/streamplacedeps" ··· 69 70 panicIfErr(err) 70 71 fmt.Printf("Iter items: %+v\n", items3) 71 72 73 + go func() { 74 + time.Sleep(5 * time.Second) 75 + node.Shutdown() // or whatever your shutdown method is 76 + }() 77 + 72 78 sub := db.Subscribe(iroh.NewFilter()) 73 79 for { 74 80 ev, err := sub.NextRaw() 75 81 panicIfErr(err) 82 + if ev == nil { 83 + fmt.Println("Subscription closed") 84 + break 85 + } 76 86 switch (*ev).(type) { 77 87 case iroh.SubscribeItemEntry: 78 88 fmt.Printf("%+v\n", (*ev).(iroh.SubscribeItemEntry))