interfaces.go 304 B

12345678910
  1. package common
  2. // Runnable is the interface for objects that can start to work and stop on demand.
  3. type Runnable interface {
  4. // Start starts the runnable object. Upon the method returning nil, the object begins to function properly.
  5. Start() error
  6. // Close stops the object being working.
  7. Close()
  8. }