github.com/simpleiot/simpleiot@v0.18.3/client/start-stop.go (about)

     1  package client
     2  
     3  // RunStop is an interface that implements the Run() and Stop() methods.
     4  // This pattern is used wherever long running processes are required.
     5  // Warning!!! Stop() may get called after Run() has exitted when using
     6  // mechanisms like run.Group, so be sure that Stop() never blocks -- it must
     7  // return for things to work properly.
     8  type RunStop interface {
     9  	Run() error
    10  	Stop(error)
    11  }