Using Go, I am looking for a way to do RPC where I can send some meta-data and an associated stream of data. The meta-data is small and will fit in memory, so can be transferred using any number of ways, but then the associated large buffer won't fit in memory and we don't want to keep a copy in memory, we just want to stream it/operate on it as a stream.
As an example, say I want to set up an image resizing server. I want to make a call to the server with the dimensions of the resized image and some other parameters, but assume the image itself won't fit in memory (on the client, we're reading it off disk, or streaming it from a separate network call, for example).