Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrCanceled = errors.New("operation canceled")
Functions ¶
This section is empty.
Types ¶
type AsyncBuildJobs ¶ added in v1.16.1
type AsyncBuildJobs struct {
// contains filtered or unexported fields
}
func NewAsyncBuildJobs ¶ added in v1.16.1
func NewAsyncBuildJobs(ctx context.Context, appID string, tracker *OpTracker) *AsyncBuildJobs
func (*AsyncBuildJobs) Tracker ¶ added in v1.16.1
func (a *AsyncBuildJobs) Tracker() *OpTracker
func (*AsyncBuildJobs) Wait ¶ added in v1.16.1
func (a *AsyncBuildJobs) Wait() error
type OpTracker ¶
type OpTracker struct {
// contains filtered or unexported fields
}
func NewLineMode ¶ added in v1.56.8
NewLineMode creates a tracker that emits one plain-text line per state change instead of redrawing a spinner display. Suited for non-interactive agents (no ANSI, no spinner). The stream is unused — this constructor exists so callers don't need to plumb a CommandMessage stream they don't have.
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.
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
}