Documentation ¶
Overview ¶
Package logread deals with mapping from logentry types into rpc types. Services that have to read the log and process it will find this helpful.
Index ¶
Constants ¶
const MaxOffset = 1000
MaxOffset contains the limit for the number of offsets available for a single log entry. offset must be 1 <= offset < MaxOffset
Variables ¶
This section is empty.
Functions ¶
func KID ¶
KID calculates a KID given a log index and an offset. KIDs represent entities in the graph: subject, predicate, factIds. Index must be > 0 and offset must be 1 <= offset < MaxOffset. If you pass an index or offset that's outside the valid ranges for those this function will panic.
func KIDof ¶
func KIDof(idx blog.Index, k *logentry.KIDOrOffset) uint64
KIDof will return the KID for this KIDOrOffset, resolving an offset to a KID given the provided log index if needed. It returns 0 if k does not have a specific KID or Offset set.
Types ¶
This section is empty.