logsagentpipelineimpl

package module
v0.55.0-devel Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 22 Imported by: 1

Documentation

Overview

Package logsagentpipelineimpl contains the implementation for the logs agent pipeline component

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Module

func Module() fxutil.Module

Module defines the fx options for this component.

func NewLogsAgent

func NewLogsAgent(deps Dependencies) logsagentpipeline.LogsAgent

NewLogsAgent returns a new instance of Agent with the given dependencies

func NewLogsAgentComponent

func NewLogsAgentComponent(deps Dependencies) optional.Option[logsagentpipeline.Component]

NewLogsAgentComponent returns a new instance of Agent as a Component

func NewStatusProvider

func NewStatusProvider() statusinterface.Status

NewStatusProvider fetches the status and returns a service wrapping it

Types

type Agent

type Agent struct {
	// contains filtered or unexported fields
}

Agent represents the data pipeline that collects, decodes, processes and sends logs to the backend.

func (*Agent) GetPipelineProvider

func (a *Agent) GetPipelineProvider() pipeline.Provider

GetPipelineProvider gets the pipeline provider

func (*Agent) SetupPipeline

func (a *Agent) SetupPipeline(
	processingRules []*config.ProcessingRule,
)

SetupPipeline initializes the logs agent pipeline and its dependencies

func (*Agent) Start

func (a *Agent) Start(context.Context) error

Start sets up the logs agent and starts its pipelines

func (*Agent) Stop

func (a *Agent) Stop(context.Context) error

Stop stops the logs agent and all elements of the data pipeline

type Dependencies

type Dependencies struct {
	fx.In

	Lc       fx.Lifecycle
	Log      logComponent.Component
	Config   configComponent.Component
	Hostname hostnameinterface.Component
}

Dependencies specifies the list of dependencies needed to initialize the logs agent

type StatusProvider

type StatusProvider struct{}

StatusProvider is the type for logs agent status methods

func (StatusProvider) AddGlobalWarning

func (p StatusProvider) AddGlobalWarning(string, string)

AddGlobalWarning keeps track of a warning message to display on the status.

func (StatusProvider) RemoveGlobalWarning

func (p StatusProvider) RemoveGlobalWarning(string)

RemoveGlobalWarning loses track of a warning message that does not need to be displayed on the status anymore.

Jump to

Keyboard shortcuts

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