Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoroutineRunner ¶
type GoroutineRunner struct {
}
GoroutineRunner is an implementation of Runner that uses goroutines.
func NewGoroutineRunner ¶
func NewGoroutineRunner() *GoroutineRunner
NewGoroutineRunner creates a new GoroutineRunner instance.
type Runner ¶
type Runner interface {
// RunTask runs a given task.
RunTask(ctx context.Context, runnable Runnable) error
}
Runner defines a means of running tasks. This is intended to run tasks with a finite lifetime. For any tasks that should run for the duration of an application, consider using a conventional goroutine.
type SynchronousRunner ¶
type SynchronousRunner struct {
}
SynchronousRunner is a synchronous implementation of Runner, executing the tasks as blocking units of work.
func NewSynchronousRunner ¶
func NewSynchronousRunner() *SynchronousRunner
NewSynchronousRunner creates a new instance of SynchronousRunner.
Click to show internal directories.
Click to hide internal directories.