Using Protocol Buffer `Any` Types in Go

Introduction This post utilizes Protocol Buffers and GRPC in the context of creating a key value store in Go. Protocol Buffers are a great way to serialize message data for transmission and GRPC builds on Protocol Buffers to describe services and how the messages passed between them. A simplistic put request for a key value store could be described with the following protocol buffer code: 1 2 3 4 message PutRequest { string key = 1; string value = 2; } The PutRequest has two fields, key and a value, which are assigned numbers for encoding the Protocol Buffer wire format....