agent

package
v0.0.0-...-2feb83d Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 45 Imported by: 0

Documentation

Overview

Package agent contains logs agent component.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MockModule

func MockModule() fxutil.Module

MockModule defines the fx options for the mock component.

func Module

func Module() fxutil.Module

Module defines the fx options for this component.

Types

type Component

type Component interface {
	// AddScheduler adds an AD scheduler to the logs agent
	AddScheduler(scheduler schedulers.Scheduler)

	// Get the logs sources
	GetSources() *sources.LogSources

	// GetMessageReceiver gets the diagnostic message receiver
	GetMessageReceiver() *diagnostic.BufferedMessageReceiver

	// GetPipelineProvider gets the pipeline provider
	GetPipelineProvider() pipeline.Provider
}

Component is the component type.

type Mock

type Mock interface {
	Component

	SetSources(sources *sources.LogSources)
}

Mock implements mock-specific methods.

type SchedulerProvider

type SchedulerProvider struct {
	fx.Out

	Scheduler schedulers.Scheduler `group:"log-agent-scheduler"`
}

SchedulerProvider provides a scheduler for the log Agent.

func NewSchedulerProvider

func NewSchedulerProvider(scheduler schedulers.Scheduler) SchedulerProvider

NewSchedulerProvider returns a new SchedulerProvider.

type ServerlessLogsAgent

type ServerlessLogsAgent interface {
	Component
	Start() error
	Stop()

	// Flush flushes synchronously the pipelines managed by the Logs Agent.
	Flush(ctx context.Context)
}

ServerlessLogsAgent is a compat version of the component for the serverless agent

func NewServerlessLogsAgent

func NewServerlessLogsAgent() ServerlessLogsAgent

NewServerlessLogsAgent creates a new instance of the logs agent for serverless

type StatusProvider

type StatusProvider struct{}

StatusProvider is the type for logs agent status methods

func NewStatusProvider

func NewStatusProvider() *StatusProvider

NewStatusProvider fetches the status and returns a service wrapping it

func (StatusProvider) AddGlobalWarning

func (p StatusProvider) AddGlobalWarning(key string, warning string)

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

func (StatusProvider) HTML

func (p StatusProvider) HTML(verbose bool, buffer io.Writer) error

HTML renders the HTML output

func (StatusProvider) JSON

func (p StatusProvider) JSON(verbose bool, stats map[string]interface{}) error

JSON populates the status map

func (StatusProvider) Name

func (p StatusProvider) Name() string

Name returns the name

func (StatusProvider) RemoveGlobalWarning

func (p StatusProvider) RemoveGlobalWarning(key string)

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

func (StatusProvider) Section

func (p StatusProvider) Section() string

Section returns the section

func (StatusProvider) Text

func (p StatusProvider) Text(verbose bool, buffer io.Writer) error

Text renders the text output

Directories

Path Synopsis
config module

Jump to

Keyboard shortcuts

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