files

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileEvent

type FileEvent struct {
	Path      string    `json:"path"`
	Name      string    `json:"name"`
	Operation string    `json:"operation"`
	Size      int64     `json:"size"`
	ModTime   time.Time `json:"mod_time"`
	IsDir     bool      `json:"is_dir"`
	Content   string    `json:"content,omitempty"`
	Timestamp time.Time `json:"timestamp"`
}

FileEvent represents a file system event

type FileWatcherFactory

type FileWatcherFactory struct{}

FileWatcherFactory creates file watcher sources

func (*FileWatcherFactory) Create

func (*FileWatcherFactory) GetConfigSchema

func (f *FileWatcherFactory) GetConfigSchema() adapters.ConfigSchema

func (*FileWatcherFactory) ValidateConfig

func (f *FileWatcherFactory) ValidateConfig(config adapters.SourceConfig) error

type FileWatcherSource

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

FileWatcherSource monitors file system changes

func NewFileWatcherSource

func NewFileWatcherSource(sourceID string, config WatcherConfig) (*FileWatcherSource, error)

NewFileWatcherSource creates a new file system watcher source

func (*FileWatcherSource) GetMetadata

func (f *FileWatcherSource) GetMetadata() adapters.SourceMetadata

func (*FileWatcherSource) GetSourceSchema

func (f *FileWatcherSource) GetSourceSchema() *adapters.Schema

func (*FileWatcherSource) HealthCheck

func (f *FileWatcherSource) HealthCheck() error

func (*FileWatcherSource) Start

func (f *FileWatcherSource) Start(ctx context.Context) error

func (*FileWatcherSource) Stop

func (f *FileWatcherSource) Stop(ctx context.Context) error

func (*FileWatcherSource) Subscribe

func (f *FileWatcherSource) Subscribe(ctx context.Context, factTypes []string) (<-chan *adapters.TypedFact, error)

type WatcherConfig

type WatcherConfig struct {
	Paths       []string `json:"paths" yaml:"paths"`
	Patterns    []string `json:"patterns" yaml:"patterns"`
	Events      []string `json:"events" yaml:"events"`
	SchemaName  string   `json:"schema_name" yaml:"schema_name"`
	MaxFileSize int64    `json:"max_file_size" yaml:"max_file_size"`
	Recursive   bool     `json:"recursive" yaml:"recursive"`
}

WatcherConfig holds configuration for file system watcher

Jump to

Keyboard shortcuts

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