util

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reminder

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

Reminder is used for time consuming operations to remind user about progress.

func NewReminder

func NewReminder(level logrus.Level, interval time.Duration) *Reminder

NewReminder returns a new Reminder instance.

`level`: log level to remind in general.

`interval`: interval to remind in warning level.

func (*Reminder) Remind

func (reminder *Reminder) Remind(message string, fields ...logrus.Fields)

Remind reminds about specified `message` and optional `fields`.

func (*Reminder) RemindWith

func (reminder *Reminder) RemindWith(message string, key string, value interface{})

RemindWith reminds about specified `message` along with `key` and `value`.

Jump to

Keyboard shortcuts

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