Skip to content

Latest commit

 

History

History

example

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

fsmonitor example

Monitors file system change and send messages over to the Kafka cluster

Workflow

  • monitor = fsmonitor.New(...) && go monitor.Start(...)
  • range over monitor.Notices() to collect file change notices
  • Sends messages over to kafka cluster under a predefined topic using sarama.SyncProducer.
  • In the meantime, log to kafka cluster under topic.process.log topic using sarama.AsyncProducer.

Inspired by sarama's http_sever example