Documentation
¶
Overview ¶
Copyright (C) 2022, Lux Industries Inc. All rights reserved. See the file LICENSE for licensing terms.
Copyright (C) 2022, Lux Industries Inc. All rights reserved. See the file LICENSE for licensing terms.
Copyright (C) 2025, Lux Industries, Inc. All rights reserved. See the file LICENSE for licensing terms.
Copyright (C) 2025, Lux Industries, Inc. All rights reserved. See the file LICENSE for licensing terms.
Index ¶
- 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 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 ¶
This section is empty.
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 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()