Skip to content

Instantly share code, notes, and snippets.

@pweil-
Last active August 29, 2015 14:13
Show Gist options
  • Save pweil-/a9afa4048ace368c42a0 to your computer and use it in GitHub Desktop.
Save pweil-/a9afa4048ace368c42a0 to your computer and use it in GitHub Desktop.
E0120 18:25:14.183656 1 reflector.go:114] watch of *api.Route ended with error: very short watch
-------------------------------------------------- body: &{0xc2080971c0 {0 0} false ?reflect.Value? 0x549490 0x549420}
-------------------------------------------------- start: {"Type":"ADDED","Object":{"kind":"route","apiVersion":"v1beta1","metadata":{"creationTimestamp":null},"host":"www.example.com","serviceName":"example"}}
-------------------------------------------------- decoded: : <nil> : EOF
fmt.Printf("-------------------------------------------------- body: %v \n", resp.Body)
var start = make([]byte, 5000)
resp.Body.Read(start)
fmt.Printf("-------------------------------------------------- start: %v \n", string(start))
e, o, er := watchjson.NewDecoder(resp.Body, r.codec).Decode()
fmt.Printf("-------------------------------------------------- decoded: %v : %v : %v \n", e, o, er)
return watch.NewStreamWatcher(watchjson.NewDecoder(resp.Body, r.codec)), nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment