Documentation ¶
Overview ¶
Package wire provides parsing logic on ResourceD TCP wire protocol. The protocol looks like this:
type:base64|created:unix-timestamp|content:base64= type:plain|created:unix-timestamp|content:plaintext type:json|created:unix-timestamp|content:{"foo": "bar"}
Within Master daemon, this wire format is used for passing data through the message bus. The protocol looks like this:
topic:topic-name|type:json|created:unix-timestamp|content:{"foo": "bar"}
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Wire ¶
func ParseSingle ¶
ParseSingle parses a single line of ResourceD TCP wire protocol.
func (Wire) Base64Content ¶
Base64Content returns the base64 version of content.
func (Wire) EncodeBase64 ¶
EncodePlain builds the wire protocol for base64 type.
func (Wire) EncodeJSON ¶
func (Wire) EncodePlain ¶
EncodePlain builds the wire protocol for plaintext type.
func (Wire) JSONStringContent ¶
JSONStringContent returns the JSON content.
func (Wire) PlainContent ¶
PlainContent returns the plaintext version of content.
Click to show internal directories.
Click to hide internal directories.