is_logbook_client 0.4.0
is_logbook_client: ^0.4.0 copied to clipboard
Reads and writes an is_logbook service over its Unix sockets: subscribe, tip and get on the read socket, one entry per request on the write socket.
Changelog #
0.4.0 #
For is_logbook 0.5.0, whose read socket ends every entry line with the trajectory that owns the entry's chain. Breaking:
- On the wire: this version reads only a 0.5.0 service, and 0.3.0 can't
read one.
subscribeframes areentry <id> <kind> <previous> <length> <trajectory>, andgetsends the 96 bytes as a seventh word. A five-word entry line isReadBroken. Entryhastrajectory, aTrajectoryId?from is_shapes (null for-), and its constructor requires it.TrajectoryIdis re-exported from here.- The trajectory is read strictly: anything but 64 lower-case hex or
-isReadBroken, and so is a trajectory on bytes without a header, which are in no chain.
A reader that walked previous links back to a users-assigned-to-trajectory
to find an entry's trajectory can read Entry.trajectory instead, and
subscribe to only the kinds it uses. One difference: the stamp also covers
roots of attaching kinds such as reply-chunk, which a walk from
users-assigned-to-trajectory roots never reached, so those entries now
show up on their trajectory.
0.3.0 #
Depends on is_logbook_format
in place of is_logbook. The client
used only the format (Kind, ObjectId and LogbookEntry), but depending
on is_logbook handed every program on this client the logbook's writer, so
it could open the logbook's directory and append past the service's sender
table and ownership checks. Now it can only reach the logbook through the
service's sockets, and a test walks the imports from lib/ and bin/ to
keep it that way.
KindandObjectIdare still re-exported from this package, now from is_logbook_format; code that takes them from here does not change.- A program that imports both this client and
package:is_logbookneeds is_logbook 0.3.1 or later, which re-exports the sameKind; on is_logbook 0.3.0 the twoKinds are different classes. - For services on is_logbook 0.3: a service refuses a sender table naming
user 65534 (
nobody) or 4294967294–4294967295, and closes a trajectory ontrajectory-closed(Kind.trajectoryClosed); writes to a closed trajectory come back asWriteRefusedwith whytrajectory-closed <trajectory>. - Nothing on the wire changes.
0.2.0 #
For is_logbook 0.2.0, where an entry's id is the sha256 of its bytes. Breaking:
- Ids are
ObjectId, re-exported from this package;EntryHashis no longer exported.Entry.hashis nowEntry.id. - Every entry is checked against its id, from
subscribeas well asget, soEntry.checkedis gone. Its header must match its frame's kind and previous. - New
AlreadyRecorded: the same bytes were already recorded. Sending the same bytes again afterWriteFailedorUnansweredis now safe. - The writer checks that
okandrefused duplicatename the id of what it sent; any other id isUnanswered. Entry.kindis no longer nullable. Bytes without a header, which onlygetcan return, areGotEntryWithoutHeader.GotUnreadable.whyis anUnreadableenum:missingorcorrupt.- The README's socket paths are placeholders.
0.1.1 #
- Cancelling a
subscribestream now completes while the subscription is waiting for new entries; it used to wait for the next entry, forever if none came.
0.1.0 #
- The client for an is_logbook
service, replacing is_journal_client 0.1.2.
JournalWriterandJournalReaderare nowLogbookWriterandLogbookReader; every other name is unchanged. LogbookWriter: one entry per connection, answeredWritten,NotTip,WriteRefused,WriteFailedorUnanswered, with a timeout.LogbookReader:subscribe,tipandgeton the read socket.getchecks the entry against its 96 bytes. Everything the service sends is read strictly.