app

package
v0.0.0-...-4c236fb Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Watch

func Watch(params *Params, receiver chan<- []byte) error

Watch watches directory and runs command.

Types

type ChannelWriter

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

func NewChannelWriter

func NewChannelWriter(sendTo chan<- []byte) *ChannelWriter

func (*ChannelWriter) Write

func (w *ChannelWriter) Write(p []byte) (n int, err error)

type EventHandler

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

func NewEventHandler

func NewEventHandler(params *Params, receiver chan<- []byte) *EventHandler

func (*EventHandler) HandleEvent

func (eh *EventHandler) HandleEvent(event fsnotify.Event) error

HandleEvent handles event.

type Params

type Params struct {
	Directory   string
	Filters     []string
	Command     []string
	ExitOnError bool
}

Params represents parameters for watcher.

type StdoutPrinter

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

func NewStdoutPrinter

func NewStdoutPrinter(receiver <-chan []byte) *StdoutPrinter

func (*StdoutPrinter) Print

func (p *StdoutPrinter) Print()

Jump to

Keyboard shortcuts

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