httk.store.store_timestamp¶
Backend-neutral store-managed timestamp helpers.
Attributes¶
Exceptions¶
A writable store clock is behind its process-local timestamp mark. |
Functions¶
|
Capture one guarded store-unit timestamp from a nanosecond clock. |
|
Advance a process-local timestamp high-water mark after a successful save. |
|
Encode the persisted timestamp configuration marker. |
|
Parse a persisted timestamp marker, returning |
|
Convert a nanosecond, aware datetime, or RFC3339 string to store units. |
Module Contents¶
- httk.store.store_timestamp.FUTURE_TIMESTAMP_SLACK_NS = 2000000000¶
- exception httk.store.store_timestamp.StoreClockRegressionError(mark_ns, clock_ns)¶
Bases:
RuntimeErrorA writable store clock is behind its process-local timestamp mark.
- httk.store.store_timestamp.capture_store_timestamp(clock, resolution, mark, *, allow_clock_regression=False, clock_regression_grace=True)¶
Capture one guarded store-unit timestamp from a nanosecond clock.
- httk.store.store_timestamp.advance_store_timestamp_mark(mark, captured, *, allow_clock_regression)¶
Advance a process-local timestamp high-water mark after a successful save.
- httk.store.store_timestamp.encode_store_timestamp_state(enabled, resolution)¶
Encode the persisted timestamp configuration marker.
- httk.store.store_timestamp.parse_store_timestamp_state(value)¶
Parse a persisted timestamp marker, returning
Nonefor unknown values.
- httk.store.store_timestamp.ns_operand_to_store_units(value, resolution)¶
Convert a nanosecond, aware datetime, or RFC3339 string to store units.