manager.go 338 B

123456789101112131415161718
  1. package overwatch
  2. // Service is the required functions for an object to be managed by the overwatch Manager
  3. type Service interface {
  4. Name() string
  5. Type() string
  6. Hash() string
  7. Shutdown()
  8. Run() error
  9. }
  10. // Manager is based type to manage running services
  11. type Manager interface {
  12. Add(Service)
  13. Remove(string)
  14. Services() []Service
  15. }