monitor

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package monitor acts as the core orchestrator for the GitOps agent. It coordinates polling intervals, webhook triggers, repository updates, SSH deployments, and notifications.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Monitor

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

Monitor coordinates the reconciliation loop between the Git repository and the target deployment environment.

func NewMonitor

func NewMonitor(cfg *config.Config, gitOps *gitops.Service, sshService *ssh.Service, storage *storage.Service, notification *notification.Service, triggerChan chan struct{}) *Monitor

NewMonitor initializes the Monitor with all necessary dependencies and the communication channel for webhook triggers.

func (*Monitor) Start

func (m *Monitor) Start(ctx context.Context) error

Start begins the main monitoring loop. It performs an initial clone and then listens for timer ticks or webhook triggers to execute reconciliation. It respects the provided context.Context for graceful shutdown.

Jump to

Keyboard shortcuts

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