Documentation
¶
Overview ¶
Copyright (C) 2022-2025, Lux Industries Inc. All rights reserved. See the file LICENSE for licensing terms.
Copyright (C) 2022-2025, Lux Industries Inc. All rights reserved. See the file LICENSE for licensing terms.
Copyright (C) 2022-2025, Lux Industries, Inc. All rights reserved. See the file LICENSE for licensing terms.
Copyright (C) 2022-2025, Lux Industries, Inc. All rights reserved. See the file LICENSE for licensing terms.
Index ¶
- Constants
- func ConvertToStringWithThousandSeparator(input uint64) string
- func DefaultTable(title string, headers []string) *tablewriter.Table
- func ExtraStepExecuted(bar *progressbar.ProgressBar) error
- func FormatDuration(d time.Duration) string
- func NewUserLog(log luxlog.Logger, userwriter io.Writer)
- func PrintTableEndpoints(clusterInfo *rpcpb.ClusterInfo)
- func PrintWait(cancel chan struct{})
- func SpinComplete(s *ysmrr.Spinner)
- func SpinFailWithError(s *ysmrr.Spinner, txt string, err error)
- func TimedProgressBar(duration time.Duration, title string, extraSteps int) (*progressbar.ProgressBar, error)
- type TableCompatWrapper
- type UserLog
- func (ul *UserLog) Error(msg string, args ...interface{})
- func (ul *UserLog) GreenCheckmarkToUser(msg string, args ...interface{})
- func (ul *UserLog) Info(msg string, args ...interface{})
- func (ul *UserLog) PrintLineSeparator(msg ...string)
- func (ul *UserLog) PrintToUser(msg string, args ...interface{})
- func (ul *UserLog) RedXToUser(msg string, args ...interface{})
- type UserSpinner
Constants ¶
const ALIGN_LEFT = tablewriter.ALIGN_LEFT
SetAlignment sets the alignment (compatibility constant)
Variables ¶
This section is empty.
Functions ¶
func DefaultTable ¶
func DefaultTable(title string, headers []string) *tablewriter.Table
DefaultTable creates a default table with the given title and headers
func ExtraStepExecuted ¶
func ExtraStepExecuted(bar *progressbar.ProgressBar) error
func FormatDuration ¶
FormatDuration returns a user friendly string for a duration
func PrintTableEndpoints ¶
func PrintTableEndpoints(clusterInfo *rpcpb.ClusterInfo)
PrintTableEndpoints prints the endpoints coming from the healthy call
func PrintWait ¶
func PrintWait(cancel chan struct{})
PrintWait does some dot printing to entertain the user
func SpinComplete ¶
func TimedProgressBar ¶
func TimedProgressBar( duration time.Duration, title string, extraSteps int, ) (*progressbar.ProgressBar, error)
Types ¶
type TableCompatWrapper ¶ added in v1.9.5
type TableCompatWrapper struct {
*tablewriter.Table
// contains filtered or unexported fields
}
TableCompatWrapper provides backward compatibility for tablewriter v0.0.5 API on top of tablewriter v0.0.5+ (maintaining compatibility)
func CreateCompatTable ¶ added in v1.9.5
func CreateCompatTable() *TableCompatWrapper
CreateCompatTable creates a table with v0.0.5-like API
func NewCompatTable ¶ added in v1.9.5
func NewCompatTable() *TableCompatWrapper
NewCompatTable creates a new table with v0.0.5-like API
func (*TableCompatWrapper) AppendCompat ¶ added in v1.9.5
func (t *TableCompatWrapper) AppendCompat(row []string)
AppendCompat adds a row using string slice (old API)
func (*TableCompatWrapper) SetAlignment ¶ added in v1.9.5
func (t *TableCompatWrapper) SetAlignment(align int)
SetAlignment sets the alignment for rows
func (*TableCompatWrapper) SetAutoMergeCells ¶ added in v1.9.5
func (t *TableCompatWrapper) SetAutoMergeCells(enable bool)
SetAutoMergeCells enables/disables cell merging
func (*TableCompatWrapper) SetHeader ¶ added in v1.9.5
func (t *TableCompatWrapper) SetHeader(headers []string)
SetHeader sets the headers using the old API
func (*TableCompatWrapper) SetRowLine ¶ added in v1.9.5
func (t *TableCompatWrapper) SetRowLine(enable bool)
SetRowLine enables/disables row lines
type UserLog ¶
type UserLog struct {
// contains filtered or unexported fields
}
var Logger *UserLog
func (*UserLog) GreenCheckmarkToUser ¶
GreenCheckmarkToUser prints a green checkmark success message to the user
func (*UserLog) PrintLineSeparator ¶
PrintLineSeparator prints a line separator
func (*UserLog) PrintToUser ¶
PrintToUser prints msg directly on the screen, but also to log file
func (*UserLog) RedXToUser ¶
RedXToUser prints a red X error message to the user
type UserSpinner ¶
type UserSpinner struct {
// contains filtered or unexported fields
}
func NewUserSpinner ¶
func NewUserSpinner() *UserSpinner
func (*UserSpinner) SpinToUser ¶
func (us *UserSpinner) SpinToUser(msg string, args ...interface{}) *ysmrr.Spinner
func (*UserSpinner) Stop ¶
func (us *UserSpinner) Stop()