Documentation
¶
Index ¶
- Constants
- func AddEffectiveStream(value int64) int64
- func AddFailedCount(value int64) int64
- func AddFinishedCount(value int64) int64
- func AddFinishedStream(value int64) int64
- func AddResumeCount(value int64) int64
- func AddSucceedCount(value int64) int64
- func AddSucceedStream(value int64) int64
- func AddTransaction(value int64) int64
- func AddWarningCount(value int64) int64
- func CompareAndSetWarningCount(oldValue, newValue int64) bool
- func GetFailedCount() int64
- func GetFinishedStream() int64
- func GetResumeCount() int64
- func GetSucceedCount() int64
- func GetSucceedStream() int64
- func GetTotalStream() int64
- func GetTransaction() int64
- func GetWarningCount() int64
- func InitCustomizeElements(colorful bool)
- func ResetContext()
- func SetTotalCount(value int64)
- func SetTotalStream(value int64)
- type CheckSumReader
- type DefaultSingleBarChan
- func (ch *DefaultSingleBarChan) Get() int64
- func (ch *DefaultSingleBarChan) Send(delta int)
- func (ch *DefaultSingleBarChan) Send64(delta int64)
- func (ch *DefaultSingleBarChan) Set(current int64)
- func (ch *DefaultSingleBarChan) SetBytes(isBytes bool)
- func (ch *DefaultSingleBarChan) SetTemplate(template string)
- func (ch *DefaultSingleBarChan) SetTotalCount(totalCount int64)
- func (ch *DefaultSingleBarChan) Start()
- func (ch *DefaultSingleBarChan) WaitToFinished()
- type NilSingleBarChan
- func (ch *NilSingleBarChan) Send(delta int)
- func (ch *NilSingleBarChan) Send64(delta int64)
- func (ch *NilSingleBarChan) SetBytes(isBytes bool)
- func (ch *NilSingleBarChan) SetTemplate(template string)
- func (ch *NilSingleBarChan) SetTotalCount(totalCount int64)
- func (ch *NilSingleBarChan) Start()
- func (ch *NilSingleBarChan) WaitToFinished()
- type ReaderWrapper
- type SingleBarChan
- type SingleProgressReader
Constants ¶
View Source
const ( Standard = `{{bar . }} {{percent . }} {{speed .}} {{rtime . }}` Simple = `{{bar .}} {{percent . }} {{counter . }} {{crtime . }}` TpsOnly = `{{bar . | tpsBarColor}} {{percent . }} {{tps .}} {{counter . }} {{crtime . }}` SpeedOnly = `{{bar . | speedBarColor }} {{percent . }} {{cspeed . | speedColor }} {{counter . "stream"}} {{crtime . "stream"}}` TpsAndSpeed = `{{bar . | speedBarColor}} {{percent . }} {{tps .}} {{cspeed . | speedColor}} {{counter . "stream"}} {{crtime . "stream" }}` )
Variables ¶
This section is empty.
Functions ¶
func AddEffectiveStream ¶
func AddFailedCount ¶
func AddFinishedCount ¶
func AddFinishedStream ¶
func AddResumeCount ¶
func AddSucceedCount ¶
func AddSucceedStream ¶
func AddTransaction ¶
func AddWarningCount ¶
func GetFailedCount ¶
func GetFailedCount() int64
func GetFinishedStream ¶
func GetFinishedStream() int64
func GetResumeCount ¶
func GetResumeCount() int64
func GetSucceedCount ¶
func GetSucceedCount() int64
func GetSucceedStream ¶
func GetSucceedStream() int64
func GetTotalStream ¶
func GetTotalStream() int64
func GetTransaction ¶
func GetTransaction() int64
func GetWarningCount ¶
func GetWarningCount() int64
func InitCustomizeElements ¶
func InitCustomizeElements(colorful bool)
func ResetContext ¶
func ResetContext()
func SetTotalCount ¶
func SetTotalCount(value int64)
func SetTotalStream ¶
func SetTotalStream(value int64)
Types ¶
type CheckSumReader ¶
type CheckSumReader struct { ReaderWrapper EnableChecksum bool // contains filtered or unexported fields }
func (*CheckSumReader) Base64Md5 ¶
func (csr *CheckSumReader) Base64Md5() string
func (*CheckSumReader) HexMd5 ¶
func (csr *CheckSumReader) HexMd5() string
type DefaultSingleBarChan ¶
type DefaultSingleBarChan struct { TotalCount int64 RefreshRate time.Duration Template string Width int IsBytes bool // contains filtered or unexported fields }
func (*DefaultSingleBarChan) Get ¶
func (ch *DefaultSingleBarChan) Get() int64
func (*DefaultSingleBarChan) Send ¶
func (ch *DefaultSingleBarChan) Send(delta int)
func (*DefaultSingleBarChan) Send64 ¶
func (ch *DefaultSingleBarChan) Send64(delta int64)
func (*DefaultSingleBarChan) Set ¶
func (ch *DefaultSingleBarChan) Set(current int64)
func (*DefaultSingleBarChan) SetBytes ¶
func (ch *DefaultSingleBarChan) SetBytes(isBytes bool)
func (*DefaultSingleBarChan) SetTemplate ¶
func (ch *DefaultSingleBarChan) SetTemplate(template string)
func (*DefaultSingleBarChan) SetTotalCount ¶
func (ch *DefaultSingleBarChan) SetTotalCount(totalCount int64)
func (*DefaultSingleBarChan) Start ¶
func (ch *DefaultSingleBarChan) Start()
func (*DefaultSingleBarChan) WaitToFinished ¶
func (ch *DefaultSingleBarChan) WaitToFinished()
type NilSingleBarChan ¶
type NilSingleBarChan struct{}
func (*NilSingleBarChan) Send ¶
func (ch *NilSingleBarChan) Send(delta int)
func (*NilSingleBarChan) Send64 ¶
func (ch *NilSingleBarChan) Send64(delta int64)
func (*NilSingleBarChan) SetBytes ¶
func (ch *NilSingleBarChan) SetBytes(isBytes bool)
func (*NilSingleBarChan) SetTemplate ¶
func (ch *NilSingleBarChan) SetTemplate(template string)
func (*NilSingleBarChan) SetTotalCount ¶
func (ch *NilSingleBarChan) SetTotalCount(totalCount int64)
func (*NilSingleBarChan) Start ¶
func (ch *NilSingleBarChan) Start()
func (*NilSingleBarChan) WaitToFinished ¶
func (ch *NilSingleBarChan) WaitToFinished()
type ReaderWrapper ¶
type SingleBarChan ¶
type SingleBarChan interface { Start() SetTotalCount(count int64) Send(delta int) Send64(delta int64) WaitToFinished() SetBytes(isBytes bool) SetTemplate(template string) }
func NewNilSingleBarChan ¶
func NewNilSingleBarChan() SingleBarChan
func NewSingleBarChan ¶
func NewSingleBarChan() SingleBarChan
type SingleProgressReader ¶
type SingleProgressReader struct { CheckSumReader BarCh SingleBarChan }
func NewSingleProgressReader ¶
func NewSingleProgressReader(reader io.Reader, totalCount int64, enableChecksum bool, barCh SingleBarChan) *SingleProgressReader
Source Files
¶
Click to show internal directories.
Click to hide internal directories.