Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServiceRegistry ¶
type ServiceRegistry struct {
// contains filtered or unexported fields
}
ServiceRegistry is a structure to manage core system services
func NewServiceRegistry ¶
func NewServiceRegistry() *ServiceRegistry
NewServiceRegistry creates an empty registry
func (*ServiceRegistry) Get ¶
func (s *ServiceRegistry) Get(srvc interface{}) Service
Get retrieves a service and stores a reference to it in the passed in `srvc`
func (*ServiceRegistry) RegisterService ¶
func (s *ServiceRegistry) RegisterService(service Service)
RegisterService stores a new service in the map. If a service of that type has been seen
func (*ServiceRegistry) StartAll ¶
func (s *ServiceRegistry) StartAll()
StartAll calls `Service.Start()` for all registered services
func (*ServiceRegistry) StopAll ¶
func (s *ServiceRegistry) StopAll()
StopAll calls `Service.Stop()` for all registered services
Click to show internal directories.
Click to hide internal directories.