Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Background ¶
type Background struct {
// contains filtered or unexported fields
}
Background is a container of concurrently executed tasks. It handles tasks's errors by logging them. It also recovers in case of panics.
func New ¶
func New(log logrus.FieldLogger) *Background
New constructs and returns a new Background.
func (*Background) Add ¶
func (bg *Background) Add(f func() error)
Add inserts a new task, which will be executed in background.
Click to show internal directories.
Click to hide internal directories.