note

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2026 License: MIT Imports: 7 Imported by: 0

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

View Source
const Kind = "MERGE-NOTE"

Kind is the typed line's first word.

Variables

This section is empty.

Functions

func Drop

func Drop(ctx context.Context, c redis.Cmdable, key string) (int64, error)

Drop deletes a notes list and returns how many notes it held.

func ForCopy

func ForCopy(ctx context.Context, c redis.Cmdable, stream, sprint string) ([]string, error)

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

func Line(by string, at time.Time, text string) (string, error)

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

func Load(ctx context.Context, c redis.Cmdable, keys ...string) ([]string, error)

Load reads every note of the keys, in key order then oldest first, in one round trip. A missing key contributes nothing.

func Parse

func Parse(line string) (by string, at time.Time, text string, ok bool)

Parse reads a note line's by, at and text; ok is false for another line.

func Post

func Post(ctx context.Context, c redis.Cmdable, key, by, text string, at time.Time) (int64, error)

Post appends one note to key and returns the list's length.

func SprintKey

func SprintKey(sprint string) string

SprintKey is a sprint's notes list.

func StreamNotesKey

func StreamNotesKey(stream string) string

StreamKey is a stream's notes list.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL