summaryrefslogtreecommitdiff
path: root/helpers.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-11-15 20:59:55 -0600
committerJeff Carr <[email protected]>2024-11-15 20:59:55 -0600
commitc10ff123cd90bf13ba737ec5ecb632accbffc7fa (patch)
tree36478b45bb422a9aabcfa66da86fd1df248aa298 /helpers.go
parent1fc481620f5d4a8b469a02fe5ff7e12871fe309f (diff)
sending a machine protobuf
Diffstat (limited to 'helpers.go')
-rw-r--r--helpers.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/helpers.go b/helpers.go
index 618bec1..6bbb1f7 100644
--- a/helpers.go
+++ b/helpers.go
@@ -42,3 +42,12 @@ func (p *Packages) Unmarshal(data []byte) error {
return proto.Unmarshal(data, p)
}
+// marshal to wire
+func (m *Machine) Marshal() ([]byte, error) {
+ return proto.Marshal(m)
+}
+
+// unmarshal from wire
+func (m *Machine) Unmarshal(data []byte) error {
+ return proto.Unmarshal(data, m)
+}