runner

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run added in v1.1.0

func Run(cfg *config.Config, opts ...WatchOption) error

Types

type ProcessManager

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

func New added in v1.1.0

func New(cfg *config.Config) *ProcessManager

func (*ProcessManager) GetBackoff added in v1.1.0

func (pm *ProcessManager) GetBackoff() time.Duration

func (*ProcessManager) GetDoneChan added in v1.1.0

func (pm *ProcessManager) GetDoneChan() <-chan struct{}

func (*ProcessManager) GetLastLogTime added in v1.1.0

func (pm *ProcessManager) GetLastLogTime() time.Time

func (*ProcessManager) GetLogger added in v1.1.0

func (pm *ProcessManager) GetLogger() *logger.Logger

func (*ProcessManager) GetPID added in v1.4.0

func (pm *ProcessManager) GetPID() int

func (*ProcessManager) IsRunning added in v1.3.1

func (pm *ProcessManager) IsRunning() bool

func (*ProcessManager) SetBackoff added in v1.1.0

func (pm *ProcessManager) SetBackoff(d time.Duration)

func (*ProcessManager) SetLastLogTime added in v1.1.0

func (pm *ProcessManager) SetLastLogTime(t time.Time)

func (*ProcessManager) Start

func (pm *ProcessManager) Start() error

func (*ProcessManager) Stop

func (pm *ProcessManager) Stop() error

type Processor added in v1.1.0

type Processor interface {
	Start() error
	Stop() error
	GetDoneChan() <-chan struct{}
	GetBackoff() time.Duration
	SetBackoff(d time.Duration)
	GetLastLogTime() time.Time
	SetLastLogTime(t time.Time)
	GetLogger() *logger.Logger
	IsRunning() bool
	GetPID() int
}

Processor defines the interface for process management

type WatchOption added in v1.1.0

type WatchOption func(*watchOptions)

WatchOption configures the Watch function

func WithProcessManager added in v1.1.0

func WithProcessManager(pm Processor) WatchOption

WithProcessManager sets a custom process manager for testing

func WithRepository added in v1.1.0

func WithRepository(repo git.Repository) WatchOption

WithRepository sets a custom repository implementation

Jump to

Keyboard shortcuts

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