All Projects → ane → vigil

ane / vigil

Licence: EPL-1.0 license
Turn files into asynchronous streams

Programming Languages

clojure
4091 projects

Projects that are alternatives of or similar to vigil

manifold-cljs
Manifold implementation in Clojurescript
Stars: ✭ 45 (-16.67%)
Mutual labels:  stream, manifold
morestachio
Lightweight, powerful, flavorful, template engine.
Stars: ✭ 45 (-16.67%)
Mutual labels:  stream
rec-core
Data pipelining service
Stars: ✭ 19 (-64.81%)
Mutual labels:  stream
mobius-gui
🎨 Reactive & Stream & Driver based UI framework build on Mobius Utils, equipped with neumorphism-derived & utility-first styles.
Stars: ✭ 43 (-20.37%)
Mutual labels:  stream
ionic-chat-tutorial-react
Build a Real-Time Chat App with Ionic, React, and Stream
Stars: ✭ 19 (-64.81%)
Mutual labels:  stream
rxact
Rxact is an observable application management for Javascript app
Stars: ✭ 21 (-61.11%)
Mutual labels:  stream
ClassifierToolbox
A MATLAB toolbox for classifier: Version 1.0.7
Stars: ✭ 72 (+33.33%)
Mutual labels:  manifold
azure-event-hubs-java
☁️ Java client library for Azure Event Hubs
Stars: ✭ 49 (-9.26%)
Mutual labels:  stream
nginx-audio-track-for-hls-module
🔉 Nginx module that generates audio track for HTTP Live Streaming (HLS) streams on the fly.
Stars: ✭ 122 (+125.93%)
Mutual labels:  stream
escpos-coffee-samples
anastaciocintra.github.io/escpos-coffee
Stars: ✭ 29 (-46.3%)
Mutual labels:  stream
manifold-sample-graphql-app
A sample application demonstrating the GraphQL Manifold
Stars: ✭ 15 (-72.22%)
Mutual labels:  manifold
node-twitch-get-stream
Gets the m3u8 direct stream URLs of a live stream on twitch.tv.
Stars: ✭ 45 (-16.67%)
Mutual labels:  stream
marinate
🥘 A JavaScript library making use of Tagged Template Literals to chunk, transform and pipe a template to a given stream.
Stars: ✭ 20 (-62.96%)
Mutual labels:  stream
rtmp-social-multicast
Want to stream to Twitch, YouTube, Facebook, and/or Periscope at the same time? That's what this project allows you to do!
Stars: ✭ 42 (-22.22%)
Mutual labels:  stream
stream-together-web-extension
Watch any video together with friends.
Stars: ✭ 57 (+5.56%)
Mutual labels:  stream
ElgatoLegacy
Use your Elgato Stream Deck on Windows 7, 8 and 8.1!
Stars: ✭ 25 (-53.7%)
Mutual labels:  stream
node-pg-large-object
Large object support for PostgreSQL clients using the node-postgres library.
Stars: ✭ 31 (-42.59%)
Mutual labels:  stream
Bililive dm VR
[咕咕咕中] B站VR弹幕姬
Stars: ✭ 18 (-66.67%)
Mutual labels:  stream
xml-spac
Handle streaming XML data with declarative, composable parsers
Stars: ✭ 39 (-27.78%)
Mutual labels:  stream
GraphOne
"GraphOne: A Data Store for Real-time Analytics on Evolving Graphs", Usenix FAST'19
Stars: ✭ 46 (-14.81%)
Mutual labels:  stream

Vigil Build Status Clojars Project EPL

Vigil creates Manifold streams from files. You place a watcher on a file and the stream produces content as new content is appended to the file.

[vigil "0.1.1"] ; add this to your project.clj

Vigil can be used to monitor logs asynchronously as a stream. If you are creating an event-driven system, it's easy to create an event filter with Vigil.

Because the produced streams are Manifold streams, which act as a general-purpose compability layers for asynchronous communication, the file streams can be easily connected into other Clojure constructs, such as core.async, lazy sequences, promises, the list goes on.

For more information, see the documentation.

(require '[vigil.core :as v]
         '[manifold.stream :as s])

;; /foo/bar/baz contains "hello\nworld"
(def stream (v/watch-file "/foo/bar/baz"))

@(s/take! stream)
;; => ("hello" "world")

(spit "/foo/bar/baz" "blah\n" :append true)

;; the new line has now been pushed to the stream
@(s/take! stream)
;; => ("blah")

;; shut down the watcher
(s/close! stream)

Usage

The watcher can be stopped at any time by closing the stream. If you don't want to receive the initial content, pass false to the initial parameter in watch-file. If you delete or truncate the file, the watcher will stop and the stream will be closed.

For more information, see the documentation.

License

Copyright © 2016 Antoine Kalmbach [email protected]

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].