Giter VIP home page Giter VIP logo

tommystark / claptrap Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 1.0 2.18 MB

Monitor a file/directory, and trigger whatever action you wish. HTTP notification, file backup or anything that cross your mind. With Go plugins you can implement your own magic ! Built easily thanks to https://github.com/fsnotify/fsnotify :sunglasses:.

License: MIT License

Go 99.88% Makefile 0.12%
go filesystem monitoring tool trigger-actions go-plugin

claptrap's Introduction

claptrap

Build Status codecov Go Report Card MIT licensed

Monitor a file/directory, and trigger whatever action you wish. HTTP notification, file backup or anything that cross your mind. With Go plugins you can implement your own magic !

Built easily thanks to fsnotify 😎.

  • Download
❯ go get github.com/TommyStarK/claptrap
  • Demo

First, let's build the shared object based on the example plugin. This is a dummy plugin acting as a simple log function that prints on the standard output:

- the type of event which can be either CREATE|UPDATE|RENAME|REMOVE
- the target file attached to the event
- the timestamp of when the event has been detected
cd example/
❯ go build -buildmode=plugin -o demo
❯ cd ../

Our plugin is ready, we can now build claptrap and run it:

# build claptrap
❯ go build -mod=vendor -o claptrap

# see help
❯ ./claptrap --help

# for demo purposes we run claptrap in its own directory
❯ ./claptrap -path=. -plugin=example/demo

It's ready !! To test it you can edit the README and remove this line 😎.

Take a look at the example directory to learn how to write your first plugin.

claptrap's People

Contributors

tommystark avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

chambo-e

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.