JobDispatch

data class JobDispatch(jobID: HashID, type: String, body: JsonNode?) : JsonSerializable

Job Request/Dispatch

Immutable struct representing a new job to execute.

Parameters

jobID

Hash ID of the job to execute.

type

Arbitrary type of the job payload. Not used internally, intended to be used by the worker node.

If no type value is needed, an empty string may be used.

body

Extra data for the job. This value should not exceed 8kb in size when serialized to JSON. If a greater size payload is needed consider using an external means to grant the worker access, such as the filesystem or a database.

If no body is needed, this value may be null.

Constructors

Link copied to clipboard
fun JobDispatch(jobID: HashID, type: String, body: JsonNode?)

Constructs a new JobDispatch instance.

Types

Link copied to clipboard
object Companion : JsonDeserializable<ObjectNode, JobDispatch>

Functions

Link copied to clipboard
open override fun toJson(): ObjectNode

Converts the parent instance into a JSON node.

Link copied to clipboard
open override fun toString(): String

Properties

Link copied to clipboard
val body: JsonNode?
Link copied to clipboard
val jobID: HashID
Link copied to clipboard
val type: String