Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrCanceled = errors.New("operation canceled")
Functions ¶
This section is empty.
Types ¶
type OpTracker ¶
type OpTracker struct {
// contains filtered or unexported fields
}
func (*OpTracker) Add ¶
func (t *OpTracker) Add(msg string, minStart time.Time) OperationID
Add creates a new item on the operations tracker returning the ID for that op. minStart is the time at which the tracker will start to show the task as in progress.
This function is safe to call on a Nil OpTracker and will no-op in that case
func (*OpTracker) AllDone ¶
func (t *OpTracker) AllDone()
AllDone marks all ops as done. This function is safe to call on a Nil OpTracker and will no-op in that case
func (*OpTracker) Cancel ¶ added in v1.4.0
func (t *OpTracker) Cancel(id OperationID)
Cancel marks the operation as canceled. It is equivalent to t.Fail(id, ErrCanceled).
func (*OpTracker) Done ¶
func (t *OpTracker) Done(id OperationID, minDuration time.Duration)
Done marks the given operation as done
This function is safe to call on a Nil OpTracker and will no-op in that case
func (*OpTracker) Fail ¶
func (t *OpTracker) Fail(id OperationID, err error)
Fail marks the operation as failed with the given error
This function is safe to call on a Nil OpTracker and will no-op in that case
type OutputStream ¶ added in v1.11.0
type OutputStream interface {
Send(*daemonpb.CommandMessage) error
}