summaryrefslogtreecommitdiff
path: root/pkg/payload
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2020-12-18 22:57:33 +0300
committerValery Piashchynski <[email protected]>2020-12-18 22:57:33 +0300
commitad39466afb39fac49977cfb97f20f682f54bf35e (patch)
tree59b630ad0ef9b52eb13e0df5c8e41d92ce277950 /pkg/payload
parentee0cb478c74c393a35155c2bf51e1ef260e0e5e2 (diff)
Move roadrunner payload out of internal to pkgv2.0.0-alpha25
Diffstat (limited to 'pkg/payload')
-rwxr-xr-xpkg/payload/payload.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/pkg/payload/payload.go b/pkg/payload/payload.go
new file mode 100755
index 00000000..fac36852
--- /dev/null
+++ b/pkg/payload/payload.go
@@ -0,0 +1,16 @@
+package payload
+
+// Payload carries binary header and body to stack and
+// back to the server.
+type Payload struct {
+ // Context represent payload context, might be omitted.
+ Context []byte
+
+ // body contains binary payload to be processed by WorkerProcess.
+ Body []byte
+}
+
+// String returns payload body as string
+func (p *Payload) String() string {
+ return string(p.Body)
+}