Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Task ¶
func (*Task) Cancel ¶
func (t *Task) Cancel()
Cancel calls the context cancel function, aborting the task.
func (*Task) Subscribe ¶
func (t *Task) Subscribe() chan TaskStatus
Returns a channel which posts updates about the print status.
func (*Task) Unsubscribe ¶
func (t *Task) Unsubscribe(c chan TaskStatus)
type TaskStatus ¶
type TaskStatus struct { // Filename we are currently executing. File string // Human readable description. Text string // Percentage printend. Done float64 // Whether or not we actually do anything. Active bool // Time we started this print Started time.Time // Last command we sent. LastCommand string // Last reply we received. LastReply string }
Click to show internal directories.
Click to hide internal directories.