File size: 602 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
package app
import (
"context"
)
// LogBackgroundContext returns a context.Background with the application logger configured.
func (app *App) LogBackgroundContext() context.Context {
return app.cfg.LegacyLogger.BackgroundContext()
}
func (app *App) Pause(ctx context.Context) error {
return app.mgr.Pause(app.Context(ctx))
}
func (app *App) Resume(ctx context.Context) error {
return app.mgr.Resume(app.Context(ctx))
}
func (app *App) _pause(ctx context.Context) error {
app.events.Stop()
return nil
}
func (app *App) _resume(ctx context.Context) error {
app.events.Start()
return nil
}
|