Expand description
a system to watch for new points from other processes or threads
Modules§
- cb
- lks_tap takes a PointHandler.
Structs§
- LkSystem
- A linkspace system. The struct is not !Send. use lks_open in each thread. The first opened in each thread is set as the thread ‘default’.
- LksInfo
- miscellaneous information about the system
Enums§
Functions§
- _lks_
dump - lks_
await_ write - A future awaiting new lks_save to the storage engine.
- lks_
chsys - lks_
current - get the current system - defaults to the first call to [lks_open*]
- lks_
forget - lks_
forget_ hashes - lks_
from_ info - lks_
info - get [LkInfo] of a linkspace system
- lks_
last - Last recv stamp of this system. i.e. last result from lks_process
- lks_
list_ watches - iterate over all active (WatchID,Query, test result) - test result does not check for limits and recv bounds
- lks_
multi_ tap - lks_
mutate - lks_
open - open or create a LkSystem.
- lks_
open_ inmem - opens an in memory linkspace system. Unlike lks_open the data is not persistent, nor can it be shared across processes, but it can be lks_split and used across threads.
- lks_
process - process the log of new packets and trigger callbacks. Updates the reader to the latest state.
- lks_
process_ async - an alias for
while(true) {lks_process(lks); lks_await_write(lks).await }
Useful in an async context where other routines tap the system. * - lks_
process_ while - process callbacks until either:
- lks_
save - save a point - must lks_process* for it to be show up in a lks_scan*. Returns true if new and false if it is old. By convention if the current xstamp of a point equals zero, the database will copy the recv stamp into xstamp - This does not update the point provided as an argument.
- lks_
save_ all - save multiple packets at once - returns the number of new packets written
- lks_
save_ all_ ext - returns the range [incusive,exclusive) of recv stamps used to save new packets. total_new = r.1-r.0
- lks_
save_ new - Calls on_new - after saving - for each new point. Point::recv will return the stamp as just set in the database.
- lks_
scan - Call the callback for every query matched packet in storage. Note that new packets are only readable after a call to lks_process_*. Unlike lks_tap this only checks the :scan / :linkscan options (it does nothing for :notify, or :watch) If no :scan is set assumes :scan space-desc Break early if the callback returns true. returns number of matches. Positive if cb returned true, otherwise negative
- lks_
scan_ hashes - TODO: DOC
- lks_
scan_ one_ hash_ ref - read a single packet directly without copying.*
- lks_
scan_ one_ ref - read a single packet directly without copying.*
- lks_
split - create a clone without any callbacks. Usually to send to another thread. Requires its own lks_process calls.
- lks_
stop - close lks_tap watches based on the query id ‘:watch ID’ in the query.
- lks_
stop_ query - lks_tap
- If the :scan option is set, cb for all matching packets. If the :watch option is set, watch for new matching packets.
- lks_
tap2 - lks_tap with a custom log [tracing::Span] The span will be entered on every callback.
- lks_
watch - lks_tap that ignores the :scan option, and inserts a :watch option if none are present.
- lks_
watch2 - lks_watch with a custom log [tracing::Span] The span will be entered on every callback.
- vspan
- See lks_tap2