processtree

package
v0.8.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2024 License: BSD-3-Clause Imports: 18 Imported by: 0

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 expect 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 expect 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

View Source
const (
	INDENTS = 4
	LOGLEN  = 5
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ProcessTree

type ProcessTree struct {
	// contains filtered or unexported fields
}

func NewProcessTree

func NewProcessTree(ctx context.Context, opts []ProcessTreeOption, tree ...*ProcessTreeItem) (*ProcessTree, error)

func (*ProcessTree) Init

func (pt *ProcessTree) Init() tea.Cmd

func (*ProcessTree) Start

func (pt *ProcessTree) Start() error

func (*ProcessTree) Update

func (pt *ProcessTree) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (ProcessTree) View

func (pt ProcessTree) View() string

type ProcessTreeItem

type ProcessTreeItem struct {
	// contains filtered or unexported fields
}

func NewProcessTreeItem

func NewProcessTreeItem(textLeft, textRight string, process SpinnerProcess, children ...*ProcessTreeItem) *ProcessTreeItem

func (*ProcessTreeItem) Close added in v0.4.2

func (pti *ProcessTreeItem) Close() error

func (*ProcessTreeItem) Fd added in v0.4.2

func (pti *ProcessTreeItem) Fd() int

func (*ProcessTreeItem) Write

func (pti *ProcessTreeItem) Write(p []byte) (int, error)

Write implements `io.Writer` so we can correctly direct the output from tree process to an inline fancy logger

type ProcessTreeOption

type ProcessTreeOption func(pt *ProcessTree) error

func IsParallel

func IsParallel(parallel bool) ProcessTreeOption

func WithFailFast

func WithFailFast(failFast bool) ProcessTreeOption

func WithHideError added in v0.7.6

func WithHideError(hide bool) ProcessTreeOption

func WithHideOnSuccess added in v0.7.0

func WithHideOnSuccess(hide bool) ProcessTreeOption

func WithRenderer

func WithRenderer(norender bool) ProcessTreeOption

func WithTimeout added in v0.7.0

func WithTimeout(timeout time.Duration) ProcessTreeOption

func WithVerb

func WithVerb(verb string) ProcessTreeOption

type SpinnerProcess

type SpinnerProcess func(ctx context.Context) error

type SpinnerProcessStatus

type SpinnerProcessStatus uint
const (
	StatusPending SpinnerProcessStatus = iota
	StatusRunning
	StatusRunningChild
	StatusRunningButAChildHasFailed
	StatusFailed
	StatusFailedChild
	StatusSuccess
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL