agent

package
v2.5.3 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DBNotificationThread

func DBNotificationThread(ctx context.Context, w Worker)

func NewGoCronLogger

func NewGoCronLogger() gocron.Logger

func NewScheduler

func NewScheduler() gocron.Scheduler

func RegisterAgent

func RegisterAgent(pool db.PgxIface, provider string)

func UpdateHeartbeat

func UpdateHeartbeat(pool db.PgxIface)

UpdateHeartbeat updates the agent's heartbeat timestamp in the database. This should be called periodically to indicate the agent is still alive.

Types

type DebugMonitor

type DebugMonitor struct{}

func (*DebugMonitor) IncrementJob

func (d *DebugMonitor) IncrementJob(id uuid.UUID, name string, tags []string, status gocron.JobStatus)

func (*DebugMonitor) RecordJobTiming

func (d *DebugMonitor) RecordJobTiming(startTime, endTime time.Time, id uuid.UUID, name string, tags []string)

func (*DebugMonitor) RecordJobTimingWithStatus

func (d *DebugMonitor) RecordJobTimingWithStatus(startTime, endTime time.Time, id uuid.UUID, name string, tags []string, status gocron.JobStatus, err error)

type PrometheusListener

type PrometheusListener struct {
	*http.Server
}

func NewPrometheusListener

func NewPrometheusListener() *PrometheusListener

func (*PrometheusListener) Run

func (pl *PrometheusListener) Run()

type PrometheusMonitor

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

func NewPrometheusMonitor

func NewPrometheusMonitor() *PrometheusMonitor

func (PrometheusMonitor) IncrementJob

func (p PrometheusMonitor) IncrementJob(_ uuid.UUID, name string, tags []string, status gocron.JobStatus)

func (PrometheusMonitor) RecordJobTiming

func (p PrometheusMonitor) RecordJobTiming(startTime, endTime time.Time, _ uuid.UUID, name string, tags []string)

type Worker

type Worker interface {
	ProcessServices(context.Context) error
	ProcessEndpoint(context.Context, strfmt.UUID) error
	GetPool() db.PgxIface
	GetScheduler() gocron.Scheduler
}

Directories

Path Synopsis
f5
as3
ni

Jump to

Keyboard shortcuts

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