Documentation ¶
Overview ¶
package rpc includes the shared message types between client and server. Both client and server use rpc to communicate via the Msg{} type. Convinence methods are provided that wrap encoding/gob to hide the details of communication serialization from client/server. The intention is to have the Msg{} type sent as raw bytes in a HTTP POST body.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDeleteMsg ¶
NewDeleteMsg returns a byte buffer resulting for serialization of a Delete Msg.
Types ¶
type Msg ¶
Msg is the shared type for communication between client/server. This simplifies client calls by having a single call into the server to provide all the required actions. The Value field allows for sending arbitrarily complex data as raw bytes.
func DecodeMsg ¶
func DecodeMsg(r io.ReadCloser) *Msg
DecodeMsg converts raw bytes (assumed to be from a HTTP request) to a Msg.