executor

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2026 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

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

func NewExecutor

func NewExecutor(
	ctx context.Context,
	executorConfig *config.ExecutorConfig,
	jobChan chan scheduler.JobPayload,
	resultChan chan HTTPResult,
	monitorSvc MonitorSvc,
	logger *zerolog.Logger,
) *Executor

func (*Executor) StartWorkers

func (ew *Executor) StartWorkers()

StartWorkers starts the Executor workers

func (*Executor) Stop

func (ew *Executor) Stop()

Stop waits for all workers and http gourotines to complete

type HTTPResult

type HTTPResult struct {
	MonitorID   uuid.UUID
	MonitorURL  string
	Success     bool
	Status      int
	LatencyMs   int64
	Reason      string
	Retryable   bool
	CheckedAt   time.Time
	IntervalSec int32
	AlertEmail  string
}

type MonitorSvc

type MonitorSvc interface {
	LoadMonitor(context.Context, uuid.UUID) (monitor.Monitor, error)
	ScheduleMonitor(context.Context, uuid.UUID, int32, string)
}

Jump to

Keyboard shortcuts

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