Created
February 15, 2018 15:07
-
-
Save slok/c6dfbcc464e76f8380350988ea0bc59e to your computer and use it in GitHub Desktop.
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
// Initialize logger. | |
log := &log.Std{} | |
// Create the controller that will refresh every 30 seconds. | |
ctrl := controller.NewSequential(30*time.Second, hand, retr, log) | |
// Start our controller. | |
stopC := make(chan struct{}) | |
if err := ctrl.Run(stopC); err != nil { | |
log.Errorf("error running controller: %s", err) | |
os.Exit(1) | |
} | |
os.Exit(0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment