Documentation ¶
Overview ¶
Package services defines internal fleetspeak components relating to services.
Index ¶
Constants ¶
const MaxServiceFailureReasonLength = 900
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
A Manager starts, remembers, and shuts down services.
func NewManager ¶
func NewManager(dataStore db.Store, serviceRegistry map[string]service.Factory, stats stats.Collector, clientCache *cache.Clients) *Manager
NewManager creates a new manager using the provided components. Initially it only contains the 'system' service.
func (*Manager) HandleNewMessages ¶
func (c *Manager) HandleNewMessages(ctx context.Context, msgs []*fspb.Message, contact db.ContactID) error
HandleNewMessages handles newly arrived messages that should be processed on the fleetspeak server. This handling includes validating that we recognize its ServiceNames, saving the messages to the datastore and attempting to process them.
func (*Manager) Install ¶
func (c *Manager) Install(cfg *spb.ServiceConfig) error
Install adds a service to the configuration, removing any existing service with the same name.
func (*Manager) ProcessMessages ¶
ProcessMessages implements MessageProcessor and is called by the datastore on backlogged messages.