JobContext.fromRequest constructor
JobContext.fromRequest(
- ServerMessage msg
Create an Event context from a server message.
Implementation
factory JobContext.fromRequest($jp.ServerMessage msg) {
var payload = Proto.mapFromStruct(msg.jobRequest.data.struct);
return JobContext(
msg.id,
JobRequest(
msg.jobRequest.jobName,
payload,
),
JobResponse(),
);
}