Skip to content

Instantly share code, notes, and snippets.

@slok
Created February 15, 2018 15:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save slok/c6dfbcc464e76f8380350988ea0bc59e to your computer and use it in GitHub Desktop.
Save slok/c6dfbcc464e76f8380350988ea0bc59e to your computer and use it in GitHub Desktop.
// 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