Created
October 23, 2012 18:31
-
-
Save terrancesnyder/3940595 to your computer and use it in GitHub Desktop.
Example of subscriber to infrastructure services
This file contains hidden or 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
var cloudfront = require('./cloudfront.io'); | |
var infrastructure = new cloudfront.infrastructure(); | |
infrastructure.discover('memcache') | |
.enter(function(instance, done) { | |
// do something when a new memcache instance joins | |
done(); // callback required for ATOMIC acknowledgement (same concept as QUnit) | |
}) | |
.exit(function(instance, done) { | |
// do something when an instance has leaves | |
done(); // callback required for ATOMIC acknowledgement (same concept as QUnit) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment