Created
June 27, 2014 20:02
-
-
Save MikeBild/b980811301e1fe326f7d to your computer and use it in GitHub Desktop.
Simple ES Query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eventsource | |
.fromStreams(['os'], 'statistics') | |
.run({ | |
$init: function(state){ | |
state.count = 0; | |
return state; | |
}, | |
$completed: function(state){ | |
return state; | |
}, | |
os: function(state, item){ | |
state.count += 1; | |
return state; | |
}}, function(err, data){ | |
done(null,data); | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment