MCPcopy Create free account
hub / github.com/koding/kite / main

Function main

examples/exp2-watch/exp2-watch.go:22–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20}
21
22func main() {
23 // Create a kite
24 k := kite.New("exp2", "1.0.0")
25 k.Config = config.MustGet()
26
27 onEvent := func(e *kite.Event, err *kite.Error) {
28 fmt.Printf("e %+v\n", e)
29 fmt.Printf("err %+v\n", err)
30 }
31
32 _, err := k.WatchKites(protocol.KontrolQuery{
33 Username: k.Config.Username,
34 Environment: k.Config.Environment,
35 Name: "math",
36 // ID: "48bb002b-79f6-4a4e-6bba-a40567a08b6c",
37 }, onEvent)
38 if err != nil {
39 log.Fatalln(err)
40 }
41
42 // This is a bad example, it's just for testing the watch functionality :)
43 fmt.Println("listening to events")
44
45 select {}
46}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected