Documentation
¶
Overview ¶
Package hops keeps the local log of completed moves (state/hops.jsonl): which session went from which machine to this one, and whether the copy left behind has been marked as moved. A mark that could not be written yet (the old session was still running) is "pending" and is written by a later scan once that session has stopped.
Index ¶
Constants ¶
const ( MarkDone = "done" // the old copy carries "↪ moved to …" MarkPending = "pending" // write it once the old session has stopped MarkOff = "off" // not wanted (fork, or the user turned it off) MarkFailed = "failed" // gave up (see MarkError) // MarkDiverged: the old copy gained new turns after the move, so it is not marked; // both copies exist and hopsesh shows them as diverged. MarkDiverged = "diverged" )
Mark states for the copy left behind.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Hop ¶
type Hop struct {
Time time.Time `json:"time"`
SessionID string `json:"sessionId"`
Title string `json:"title"`
From string `json:"from"` // machine name the copy came from
To string `json:"to"` // this machine's name
Fork bool `json:"fork,omitempty"`
Notified bool `json:"notified,omitempty"` // the old session was told about the move
SourceFile string `json:"sourceFile"`
Mark string `json:"mark"`
MarkError string `json:"markError,omitempty"`
Tries int `json:"tries,omitempty"`
}
Hop is one completed move to this machine.