Documentation
¶
Overview ¶
Package timeline reads a task's timeline: its own events and those of the units linked to it, every one kept forever.
Index ¶
Constants ¶
const KindRecord = "record"
KindRecord is the event kind of a record: its Key is the record kind of records.toml, its Actor the writer, its Data the record's JSON. A unit keeps one record of each kind, the newest.
Variables ¶
This section is empty.
Functions ¶
func Pick ¶
Pick is task id's record among recs, the records of its kind by unit, as RecordOf picks it.
func RecordOf ¶
func RecordOf(ctx context.Context, r Records, kind string, id task.ID, held []unit.Unit) (port.Event, bool, error)
RecordOf is task id's record of kind: its own, else the first of held, the units it holds in order, that keeps one, as a pull request task's brief is its pull request's; false when none does.
Types ¶
type Event ¶
Event is an event of a timeline at Seq, its row in the event log, which grows with every event stored and orders and pages the timeline.
type Filter ¶
Filter narrows a timeline: Kinds keeps those event kinds (every kind when empty), Before the events whose Seq is lower (all when 0), Limit at most that many (all when 0).
type Holdings ¶
type Holdings interface {
// UnitsOf are the units task id holds, in its order; empty for a task
// with none or no such task.
UnitsOf(ctx context.Context, id task.ID) ([]unit.Unit, error)
}
Holdings are the units the tasks hold.
type Log ¶
type Log interface {
// EventsOf are the events of units f keeps, newest first (by Seq).
EventsOf(ctx context.Context, units []unit.Unit, f Filter) ([]Event, error)
}
Log reads the event log.
type Merged ¶
Merged is the Reader over the event log: a task's timeline is its own events and those of the units it holds.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package timelinetest holds an in-memory timeline.Reader.
|
Package timelinetest holds an in-memory timeline.Reader. |