Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
Decoder handles decoding Santa protobuf spool files (primary) with an optional JSON fallback used for development and testing fixtures.
func (*Decoder) DecodeEvents ¶
func (d *Decoder) DecodeEvents(path string) ([]*santapb.SantaMessage, error)
DecodeEvents decodes multiple Santa events from a spool file.
func (*Decoder) DecodeEventsContext ¶
func (d *Decoder) DecodeEventsContext(ctx context.Context, path string) ([]*santapb.SantaMessage, error)
DecodeEventsContext decodes multiple Santa events with context support.
type Watcher ¶
type Watcher struct {
// contains filtered or unexported fields
}
Watcher monitors the Santa spool directory for new files
func NewWatcher ¶
NewWatcher creates a new spool directory watcher with default settings
func NewWatcherWithOptions ¶
func NewWatcherWithOptions(spoolDir string, stabilityWait time.Duration, opts WatcherOptions) (*Watcher, error)
NewWatcherWithOptions creates a new spool directory watcher with custom options
func (*Watcher) ArchiveFile ¶
ArchiveFile moves or deletes a processed file
type WatcherOptions ¶
type WatcherOptions struct {
ArchiveDir string // Directory to move processed files (empty = delete)
CheckInterval time.Duration // How often to check file stability (default: 1s)
MaxPendingFiles int // Maximum files waiting for stability (default: 1000)
ChannelBuffer int // Size of event channel buffer (default: 100)
}
WatcherOptions contains optional configuration for the watcher
Click to show internal directories.
Click to hide internal directories.