result

package
v0.1.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MonitorIncident

type MonitorIncident struct {
	ID         uuid.UUID
	MonitorID  uuid.UUID
	StartTime  time.Time
	EndTime    time.Time
	Alerted    bool
	HttpStatus int32
	LatencyMs  int32
	CreatedAt  time.Time
}

type MonitorIncidentRepository

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

func NewMonitorIncidentRepo

func NewMonitorIncidentRepo(dbExecutor db.DBTX, logger *zerolog.Logger) *MonitorIncidentRepository

func (*MonitorIncidentRepository) CloseIncident

func (r *MonitorIncidentRepository) CloseIncident(ctx context.Context, monitorID uuid.UUID, endTime time.Time) (uuid.UUID, bool, error)

func (*MonitorIncidentRepository) Create

func (*MonitorIncidentRepository) GetByID

func (r *MonitorIncidentRepository) GetByID(ctx context.Context, incidentID uuid.UUID) (MonitorIncident, error)

type MonitorService

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

type ResultProcessor

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

func NewResultProcessor

func NewResultProcessor(
	ctx context.Context,
	resProcessorConfig *config.ResultProcessorConfig,
	redisSvc *redis.Client,
	resultChan chan executor.HTTPResult,
	incidentRepo *MonitorIncidentRepository,
	monitorSvc MonitorService,
	alertChan chan alert.AlertEvent,
	logger *zerolog.Logger,
) *ResultProcessor

func (*ResultProcessor) StartResultProcessor

func (rp *ResultProcessor) StartResultProcessor()

StartResultProcessor starts the Result Processor

func (*ResultProcessor) WorkersClosingWait

func (rp *ResultProcessor) WorkersClosingWait()

WorkersClosingWait waits for all workers to complete

Jump to

Keyboard shortcuts

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