Documentation ¶
Overview ¶
Package service provides a service wrapper around the collector regardless of managed or standalone mode.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunService ¶
func RunService(logger *zap.Logger, rSvc RunnableService) error
RunService runs the given service, calling its start and stop functions.
Types ¶
type ManagedCollectorService ¶
type ManagedCollectorService struct {
// contains filtered or unexported fields
}
ManagedCollectorService is a RunnableService that runs the collector being managed by an OpAmp enabled platform
func NewManagedCollectorService ¶
func NewManagedCollectorService(col collector.Collector, logger *zap.Logger, managerConfigPath, collectorConfigPath, loggerConfigPath string) (*ManagedCollectorService, error)
NewManagedCollectorService creates a new ManagedCollectorService
func (*ManagedCollectorService) Error ¶
func (m *ManagedCollectorService) Error() <-chan error
Error returns an empty error channel. This will never send errors.
type RunnableService ¶
type RunnableService interface { // Start asynchronously starts the underlying service. The service may not necessarily be "ready" // once this returns, but could be asynchronously starting up. Start(ctx context.Context) error // Stop synchronously shuts down the service. After this function returns, the underlying service should be completely stopped. Stop(ctx context.Context) error // Error returns an error channel that should emit an error when the service must unexpectedly quit. Error() <-chan error }
RunnableService may be run as a service.
type StandaloneCollectorService ¶
type StandaloneCollectorService struct {
// contains filtered or unexported fields
}
StandaloneCollectorService is a RunnableService that runs the collector in standalone mode.
func NewStandaloneCollectorService ¶
func NewStandaloneCollectorService(c collector.Collector) StandaloneCollectorService
NewStandaloneCollectorService creates a new StandaloneCollectorService
func (StandaloneCollectorService) Error ¶
func (s StandaloneCollectorService) Error() <-chan error
Error returns a channel that can emit asynchronous, unrecoverable errors