Documentation ¶
Index ¶
Constants ¶
View Source
const ( CLEAR = "\033[0m" BLACK = "\033[30" RED = "\033[31" GREEN = "\033[32" YELLOW = "\033[33" BLUE = "\033[34" PURPLE = "\033[35" CYAN = "\033[36" WHITE = "\033[37" BRIGHT = ";1m" DIM = ";2m" UNDERLINE = ";4m" //FLASH = ";5m" REVERSE = ";7m" BRIGHT_BLACK = BLACK + BRIGHT DIM_BLACK = BLACK + DIM UNDERLINE_BLACK = BLACK + UNDERLINE REVERSE_BLACK = BLACK + REVERSE BRIGHT_RED = RED + BRIGHT DIM_RED = RED + DIM UNDERLINE_RED = RED + UNDERLINE REVERSE_RED = RED + REVERSE BRIGHT_GREEN = GREEN + BRIGHT DIM_GREEN = GREEN + DIM UNDERLINE_GREEN = GREEN + UNDERLINE REVERSE_GREEN = GREEN + REVERSE BRIGHT_YELLOW = YELLOW + BRIGHT DIM_YELLOW = YELLOW + DIM UNDERLINE_YELLOW = YELLOW + UNDERLINE REVERSE_YELLOW = YELLOW + REVERSE BRIGHT_BLUE = BLUE + BRIGHT DIM_BLUE = BLUE + DIM UNDERLINE_BLUE = BLUE + UNDERLINE REVERSE_BLUE = BLUE + REVERSE BRIGHT_PURPLE = PURPLE + BRIGHT DIM_PURPLE = PURPLE + DIM UNDERLINE_PURPLE = PURPLE + UNDERLINE REVERSE_PURPLE = PURPLE + REVERSE BRIGHT_WHITE = WHITE + BRIGHT DIM_WHITE = WHITE + DIM UNDERLINE_WHITE = WHITE + UNDERLINE REVERSE_WHITE = WHITE + REVERSE BRIGHT_CYAN = CYAN + BRIGHT DIM_CYAN = CYAN + DIM UNDERLINE_CYAN = CYAN + UNDERLINE REVERSE_CYAN = CYAN + REVERSE )
Variables ¶
This section is empty.
Functions ¶
func AvgMultipleTrackers ¶
func AvgMultipleTrackers(trackers []*AvgTracker) float64
func CaseInsensitiveLess ¶
Types ¶
type AvgTracker ¶
type AvgTracker struct {
// contains filtered or unexported fields
}
A RateCounter is a thread-safe counter which returns the number of times 'Incr' has been called in the last interval
func NewAvgTracker ¶
func NewAvgTracker(intrvl time.Duration) *AvgTracker
Constructs a new RateCounter, for the interval provided
func (*AvgTracker) Avg ¶
func (r *AvgTracker) Avg() float64
func (*AvgTracker) Rate ¶
func (r *AvgTracker) Rate() int
Return the current number of events in the last interval
type RateCounter ¶
type RateCounter struct {
// contains filtered or unexported fields
}
A RateCounter is a thread-safe counter which returns the number of times 'Incr' has been called in the last interval
func NewRateCounter ¶
func NewRateCounter(intrvl time.Duration) *RateCounter
Constructs a new RateCounter, for the interval provided
func (*RateCounter) Rate ¶
func (r *RateCounter) Rate() int
Return the current number of events in the last interval
Click to show internal directories.
Click to hide internal directories.