MCPcopy Create free account
hub / github.com/assembla/cony / ExampleClient_Loop

Function ExampleClient_Loop

doc_test.go:98–109  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

96}
97
98func ExampleClient_Loop() {
99 client := cony.NewClient(cony.URL("amqp://guest:guest@localhost/"))
100
101 for client.Loop() {
102 select {
103 case err := <-client.Errors():
104 log.Println("CLIENT ERROR: ", err)
105 client.Close()
106 }
107 time.Sleep(1 * time.Second) // naive backoff
108 }
109}

Callers

nothing calls this directly

Calls 3

LoopMethod · 0.95
ErrorsMethod · 0.95
CloseMethod · 0.95

Tested by

no test coverage detected