cmdrunner

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CmdRunner

type CmdRunner struct {
}

CmdRunner is a runner manager and only one instance per process is needed.

Runners will be started as soon the CmdRunner.start() is called, and will be automatically stopped if the stop signal is received. Starting and stopping of runners must be handled by user, using the provided handlers.

Example:

r := NewCmdRunner()

func NewCmdRunner

func NewCmdRunner() *CmdRunner

func (*CmdRunner) Add

func (c *CmdRunner) Add(start, stop RunnerHandler)

Add a new runner

func (*CmdRunner) Wait

func (c *CmdRunner) Wait()

Wait for stop signal and stop all runners

type Runner

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

type RunnerHandler

type RunnerHandler func() error

Jump to

Keyboard shortcuts

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