watcher

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterRegistryInterface

type ClusterRegistryInterface interface {
	LoadCluster(schemaFilePath string) error
	UpdateCluster(schemaFilePath string) error
	RemoveCluster(schemaFilePath string) error
}

ClusterRegistryInterface defines the minimal interface needed from ClusterRegistry

type FileWatcher

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

FileWatcher handles file watching and delegates to cluster registry

func NewFileWatcher

func NewFileWatcher(
	log *logger.Logger,
	clusterRegistry ClusterRegistryInterface,
) (*FileWatcher, error)

NewFileWatcher creates a new watcher service

func (*FileWatcher) Initialize

func (s *FileWatcher) Initialize(ctx context.Context, watchPath string) error

Initialize sets up the watcher with the given context and path and processes existing files

func (*FileWatcher) OnFileChanged

func (s *FileWatcher) OnFileChanged(filePath string)

OnFileChanged implements watcher.FileEventHandler

func (*FileWatcher) OnFileDeleted

func (s *FileWatcher) OnFileDeleted(filePath string)

OnFileDeleted implements watcher.FileEventHandler

Jump to

Keyboard shortcuts

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