summaryrefslogtreecommitdiff
path: root/payload
diff options
context:
space:
mode:
Diffstat (limited to 'payload')
-rwxr-xr-xpayload/payload.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/payload/payload.go b/payload/payload.go
new file mode 100755
index 00000000..e1e45ac1
--- /dev/null
+++ b/payload/payload.go
@@ -0,0 +1,20 @@
+package payload
+
+import (
+ "github.com/spiral/roadrunner/v2/utils"
+)
+
+// 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 utils.AsString(p.Body)
+}