Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppManager ¶
type AppManager struct {
// contains filtered or unexported fields
}
AppManager is the default implementation of overwatch service management
func (*AppManager) Add ¶
func (m *AppManager) Add(service Service)
Add takes in a new service to manage. It stops the service if it already exist in the manager and is running It then starts the newly added service
func (*AppManager) Remove ¶
func (m *AppManager) Remove(name string)
Remove shutdowns the service by name and removes it from its current management list
func (*AppManager) Services ¶
func (m *AppManager) Services() []Service
Services returns all the current Services being managed
type Manager ¶
Manager is based type to manage running services
func NewAppManager ¶
func NewAppManager(callback ServiceCallback) Manager
NewAppManager creates a new overwatch manager
type Service ¶
Service is the required functions for an object to be managed by the overwatch Manager
type ServiceCallback ¶
ServiceCallback is a service notify it's runloop finished. the first parameter is the service type the second parameter is the service name the third parameter is an optional error if the service failed