Documentation ¶
Overview ¶
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2022, Unikraft GmbH and The KraftKit Authors. Licensed under the BSD-3-Clause License (the "License"). You may not use this file except in compliance with the License.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2022, Unikraft GmbH and The KraftKit Authors. Licensed under the BSD-3-Clause License (the "License"). You may not use this file except in compliance with the License.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2022, Unikraft GmbH and The KraftKit Authors. Licensed under the BSD-3-Clause License (the "License"). You may not use this file except in compliance with the License.
Index ¶
Constants ¶
const ( INDENTS = 4 LOGLEN = 5 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ParaProgress ¶
type ParaProgress struct {
// contains filtered or unexported fields
}
func NewParaProgress ¶
func NewParaProgress(ctx context.Context, processes []*Process, opts ...ParaProgressOption) (*ParaProgress, error)
func (ParaProgress) Init ¶
func (md ParaProgress) Init() tea.Cmd
func (*ParaProgress) Start ¶
func (pd *ParaProgress) Start() error
func (ParaProgress) View ¶
func (md ParaProgress) View() string
type ParaProgressOption ¶
type ParaProgressOption func(md *ParaProgress) error
func IsParallel ¶
func IsParallel(parallel bool) ParaProgressOption
func WithFailFast ¶
func WithFailFast(failFast bool) ParaProgressOption
func WithNameWidth ¶ added in v0.4.2
func WithNameWidth(width int) ParaProgressOption
func WithRenderer ¶
func WithRenderer(norender bool) ParaProgressOption
func WithTimeout ¶ added in v0.7.0
func WithTimeout(timeout time.Duration) ParaProgressOption
type Process ¶
type Process struct { Name string NameWidth int Status ProcessStatus // contains filtered or unexported fields }
Process ...
func NewProcess ¶
type ProcessStatus ¶
type ProcessStatus uint
const ( StatusPending ProcessStatus = iota StatusRunning StatusFailed StatusSuccess )
type ProgressMsg ¶
type ProgressMsg struct { ID int // contains filtered or unexported fields }
ProgressMsg is sent when an update in the progress percentage occurs.