func gobEncodeMessage(m Message) ([]byte, error) {
	var buf bytes.Buffer
	gobEnc := gob.NewEncoder(&buf)
	err := gobEnc.Encode(m)
	if err != nil {
		return nil, fmt.Errorf("error: gob.Encode failed: %v", err)
	}
	return buf.Bytes(), nil
}
---
gobEncodePayload will encode the message structure into gob
binary format before putting it into a nats message.
package steward
import (
	"bytes"
	"encoding/gob"
	"encoding/json"
	"fmt"
	"log"
	"os"
)
type Message struct {
	ToNode Node `json:"toNode" yaml:"toNode"`
	ToNodes []Node `json:"toNodes,omitempty" yaml:"toNodes,omitempty"`
	ID int `json:"id" yaml:"id"`
	Data []string `json:"data" yaml:"data"`
	Method Method `json:"method" yaml:"method"`
	MethodArgs []string `json:"methodArgs" yaml:"methodArgs"`
	ReplyMethod Method `json:"replyMethod" yaml:"replyMethod"`
	ReplyMethodArgs []string `json:"replyMethodArgs" yaml:"replyMethodArgs"`
	IsReply bool `json:"isReply" yaml:"isReply"`
	FromNode Node
	ACKTimeout int `json:"ACKTimeout" yaml:"ACKTimeout"`
	Retries int `json:"retries" yaml:"retries"`
	ReplyACKTimeout int `json:"replyACKTimeout" yaml:"replyACKTimeout"`
	ReplyRetries int `json:"replyRetries" yaml:"replyRetries"`
	MethodTimeout int `json:"methodTimeout" yaml:"methodTimeout"`
	ReplyMethodTimeout int `json:"replyMethodTimeout" yaml:"replyMethodTimeout"`
	Directory string `json:"directory" yaml:"directory"`
	FileName string `json:"fileName" yaml:"fileName"`
	Operation Operation `json:"operation"`
	PreviousMessage *Message
	done chan struct{}
}
type Operation struct {
	OpCmd string          `json:"opCmd"`
	OpArg json.RawMessage `json:"opArg"`
}