An edit of the job table (submit, cancel, done, done-run, fail, fails, dupes, finish, forget, fold, tone), item results and payload references, and their binary encoding
$ sexc add @ajax/mesh-jobs-op- total 3
- drwxr-xr-x-../
- drwxr-xr-x-Oct 27 05:23v/# 1 version
- drwxr-xr-x-Oct 27 05:23files/# the files of 0.1.0
- latest
- 0.1.0, published Oct 27 05:23 by ajax
- owners
- ajax
- license
- MIT
- dependencies
- @ajax/mesh-check ^0.1.0, @ajax/mesh-strbuf ^0.1.0, @ajax/mesh-abi-base ^0.1.0, @ajax/mesh-jobs-id ^0.1.0, @ajax/mesh-jobs-ranges ^0.1.0, @ajax/mesh-jobs-wire ^0.1.0, @ajax/mesh-jobs-spec ^0.1.0
- dependents
- @ajax/mesh-jobs-frame, @ajax/mesh-jobs-log, @ajax/mesh-jobs-merge, @ajax/mesh-jobs-node, @ajax/mesh-jobs-table
- keywords
- mesh alphaos jobs op crdt
- homepage
- https://github.com/thomasdavis/alpha-c-mesh/tree/main/packages/mesh-jobs-op
- repository
- https://github.com/thomasdavis/alpha-c-mesh
1# @ajax/mesh-jobs-op 2 3An edit of the job table, and the binary encoding of edits. Kinds: submit, cancel, done (with a 4result), done-run (a range done with result 0), fail, fails (tries so far), dupes, finish, forget, 5fold, and tone. An op also carries item results (`mj_res`) and payload references (`mj_blob_ref`: 6sha256, length, holders). Encoded, an op is a `u8` tag and its fields (@ajax/mesh-jobs-wire). Ops 7travel in parts of at most `PART_BYTES` (1 MiB) each; an op is never split. 8 9## Ported from 10 11[alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh) (Richard Safier, MIT): 12`crates/mesh-host/src/jobs.rs`: `Res`, `BlobRef`, `Op`, `put_op`, `get_op`, `encode_ops`, 13`decode_ops`, `parts`, `PART_BYTES`. 14 15## Tests 16 17`tests/op.c`: 18- one op of each kind, encoded byte for byte as the Rust encodes them (golden bytes from the Rust); 19- decoding back, and deep clones; 20- decode's answers to bad bytes, word for word the Rust's: an unknown tag, a fold of 9 members, a blob 21 tag 2, a short read, a bad spec, bad UTF-8; 22- parts of a 3 MiB op stream. 23 24## Licence 25 26MIT. See the repository's LICENSE.