progress

package
v5.3.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TABLE_STATE_REGISTER                       table_state_t = 0x1
	TABLE_STATE_PRESTART                       table_state_t = 0x2
	TABLE_STATE_COMPARING                      table_state_t = 0x4
	TABLE_STATE_FINISH                         table_state_t = 0x8
	TABLE_STATE_RESULT_OK                      table_state_t = 0x00
	TABLE_STATE_RESULT_FAIL_STRUCTURE_DONE     table_state_t = 0x10
	TABLE_STATE_RESULT_FAIL_STRUCTURE_CONTINUE table_state_t = 0x20
	TABLE_STATE_RESULT_FAIL_STRUCTURE_PASS     table_state_t = 0x40
	TABLE_STATE_RESULT_DIFFERENT               table_state_t = 0x80
	TABLE_STATE_HEAD                           table_state_t = 0xff
	TABLE_STATE_RESULT_MASK                    table_state_t = 0xf0
)
View Source
const (
	PROGRESS_OPT_INC progress_opt_t = iota
	PROGRESS_OPT_UPDATE
	PROGRESS_OPT_REGISTER
	PROGRESS_OPT_START
	PROGRESS_OPT_FAIL
	PROGRESS_OPT_CLOSE
	PROGRESS_OPT_ERROR
)

Variables

This section is empty.

Functions

func Close

func Close()

func Error

func Error(err error)

func FailTable

func FailTable(name string)

func Inc

func Inc(name string)

func Init

func Init(tableNums, finishTableNums int)

func PrintSummary

func PrintSummary()

func RegisterTable

func RegisterTable(name string, isFailed bool, isDone bool)

func SetOutput

func SetOutput(output io.Writer)

func StartTable

func StartTable(name string, total int, stopUpdate bool)

func UpdateTotal

func UpdateTotal(name string, total int, stopUpdate bool)

Types

type Operator

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

type TableProgress

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

type TableProgressPrinter

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

func NewTableProgressPrinter

func NewTableProgressPrinter(tableNums int, finishTableNums int) *TableProgressPrinter

func (*TableProgressPrinter) Close

func (tpp *TableProgressPrinter) Close()

func (*TableProgressPrinter) Error

func (tpp *TableProgressPrinter) Error(err error)

func (*TableProgressPrinter) FailTable

func (tpp *TableProgressPrinter) FailTable(name string)

func (*TableProgressPrinter) Inc

func (tpp *TableProgressPrinter) Inc(name string)

func (*TableProgressPrinter) PrintSummary

func (tpp *TableProgressPrinter) PrintSummary()

func (*TableProgressPrinter) RegisterTable

func (tpp *TableProgressPrinter) RegisterTable(name string, isFailed bool, isDone bool)

func (*TableProgressPrinter) SetOutput

func (tpp *TableProgressPrinter) SetOutput(output io.Writer)

func (*TableProgressPrinter) StartTable

func (tpp *TableProgressPrinter) StartTable(name string, total int, stopUpdate bool)

func (*TableProgressPrinter) UpdateTotal

func (tpp *TableProgressPrinter) UpdateTotal(name string, total int, stopUpdate bool)

Jump to

Keyboard shortcuts

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