ux

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: BSD-3-Clause Imports: 16 Imported by: 10

Documentation

Overview

Copyright (C) 2022, Ava Labs, Inc. All rights reserved. See the file LICENSE for licensing terms.

Copyright (C) 2022, Ava Labs, Inc. All rights reserved. See the file LICENSE for licensing terms.

Copyright (C) 2022, Ava Labs, Inc. All rights reserved. See the file LICENSE for licensing terms.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToStringWithThousandSeparator added in v1.2.0

func ConvertToStringWithThousandSeparator(input uint64) string

func FormatDuration added in v0.2.0

func FormatDuration(d time.Duration) string

FormatDuration returns a user friendly string for a duration

func NewUserLog

func NewUserLog(log logging.Logger, userwriter io.Writer)

func PrintEndpointTables added in v1.5.1

func PrintEndpointTables(clusterInfo *rpcpb.ClusterInfo) error

PrintEndpointTables prints the endpoints coming from the healthy call

func PrintTableEndpoints added in v0.2.0

func PrintTableEndpoints(clusterInfo *rpcpb.ClusterInfo, codespaceURLs bool) error

func PrintWait

func PrintWait(cancel chan struct{})

PrintWait does some dot printing to entertain the user

func SpinComplete added in v1.4.0

func SpinComplete(s *ysmrr.Spinner)

func SpinFailWithError added in v1.4.0

func SpinFailWithError(s *ysmrr.Spinner, txt string, err error)

Types

type UserLog

type UserLog struct {
	Writer io.Writer
	// contains filtered or unexported fields
}
var Logger *UserLog

func (*UserLog) GreenCheckmarkToUser added in v1.4.0

func (ul *UserLog) GreenCheckmarkToUser(msg string, args ...interface{})

GreenCheckmarkToUser prints a green checkmark to the user before the message

func (*UserLog) Info added in v1.5.0

func (ul *UserLog) Info(msg string, args ...interface{})

Info prints to the log file

func (*UserLog) PrintLineSeparator added in v1.4.2

func (ul *UserLog) PrintLineSeparator()

func (*UserLog) PrintToUser

func (ul *UserLog) PrintToUser(msg string, args ...interface{})

PrintToUser prints msg directly on the screen, but also to log file

func (*UserLog) RedXToUser added in v1.4.0

func (ul *UserLog) RedXToUser(msg string, args ...interface{})

type UserSpinner added in v1.4.0

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

func NewUserSpinner added in v1.4.0

func NewUserSpinner() *UserSpinner

func (*UserSpinner) SpinToUser added in v1.4.0

func (us *UserSpinner) SpinToUser(msg string, args ...interface{}) *ysmrr.Spinner

func (*UserSpinner) Stop added in v1.4.0

func (us *UserSpinner) Stop()

Jump to

Keyboard shortcuts

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