Documentation
¶
Overview ¶
Package gitops provides a simplified interface for Git operations, specifically for monitoring and Updating repositories.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service manages the Git repository lifecycle and version detection. It wraps the go-git library to provide high-level operations.
func NewService ¶
NewService initializes a new Service with the provided config.Config.
func (*Service) CheckForUpdates ¶
CheckForUpdates fetches the latest references from the remote (origin) and compares the local HEAD with the remote target branch (master/main). It returns true and the new hash if an update is detected.
func (*Service) EnsureClone ¶
EnsureClone checks if the repository exists locally at the configured path and performs a clone if it is missing.
func (*Service) UpdateLocal ¶
UpdateLocal performs a pull operation to synchronize the local repository with the latest changes from the remote tracking branch.