Documentation
¶
Overview ¶
Package note is the MERGE-NOTE record (nova-tools #4324, part 4): the typed lines a merge card ends with (a conflict it resolved, a wrong pattern it found, what the tree now expects), written on the stream's or the sprint's record so the deal pass renders them into every copy's brief at deal. A waiting or ready card gets them when it is dealt, a friend's copies at its next pull, a recut carries the note that caused it. A stream's notes expire when the landing that carried its merge card lands (stream.Merge deletes the key); a sprint's notes stay until `note drop`.
Keys:
ws:<stream>:notes list MERGE-NOTE by=<who> at=<ms> <text>, oldest first sprint:<S>:notes list the same, the sprint record's (the coordinator one level up)
Every read is one pipeline; the lines are data for a brief, never a verb.
Index ¶
- Constants
- func Drop(ctx context.Context, c redis.Cmdable, key string) (int64, error)
- func ForCopy(ctx context.Context, c redis.Cmdable, stream, sprint string) ([]string, error)
- func Line(by string, at time.Time, text string) (string, error)
- func Load(ctx context.Context, c redis.Cmdable, keys ...string) ([]string, error)
- func Parse(line string) (by string, at time.Time, text string, ok bool)
- func Post(ctx context.Context, c redis.Cmdable, key, by, text string, at time.Time) (int64, error)
- func SprintKey(sprint string) string
- func StreamNotesKey(stream string) string
Constants ¶
const Kind = "MERGE-NOTE"
Kind is the typed line's first word.
Variables ¶
This section is empty.
Functions ¶
func ForCopy ¶
ForCopy is the notes a copy's brief carries: its stream's, then the sprint's. An empty sprint reads the default sprint (the lowest score of sprint:order); an empty stream reads no stream notes.
func Line ¶
Line is one typed note line: MERGE-NOTE by=<who> at=<ms> <text>. The text is one line (inner whitespace folded); by has no spaces.
func Load ¶
Load reads every note of the keys, in key order then oldest first, in one round trip. A missing key contributes nothing.
Types ¶
This section is empty.