services

package
v0.1.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package services defines internal fleetspeak components relating to services.

Index

Constants

View Source
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

func (c *Manager) ProcessMessages(msgs []*fspb.Message)

ProcessMessages implements MessageProcessor and is called by the datastore on backlogged messages.

func (*Manager) Stop

func (c *Manager) Stop()

Stop closes and removes all services in the configuration.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL