-
Notifications
You must be signed in to change notification settings - Fork 712
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Helper for reading & writing from binary #1600
Conversation
Should we factor out https://github.com/weaveworks/scope/blob/master/app/router.go#L121 as well? Would need to support JSON. Otherwise LGTM. |
I did the refactoring. Basically I make |
return nil | ||
} | ||
|
||
// ReadBinary reads into a Report from a gzipped msgpack. |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
PTAL. |
if codecHandle != nil { | ||
decoder = codec.NewDecoder(r, codecHandle).Decode | ||
} else { | ||
decoder = gob.NewDecoder(r).Decode |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
@tomwilkie @rade PTAL. |
LGTM but the build is failing for a reason that seems related... |
The test was for gob support, which this branch removes. |
I found a couple of places where we had said in code that reports are serialized as compress msgpacks. This patch formalizes that convention by providing an API.
I'm working on another PR where I re-use this API in a different place.
There are a bunch of places in tests that could probably also be changed.
This change is