defaultforwarder

package
v0.82.0-devel Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package defaultforwarder defines the interface for the default forwarder component.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasFeature

func HasFeature(features, flag Features) bool

HasFeature lets you know if a specific feature flag is set in a feature set

func WithDisableAPIKeyChecking

func WithDisableAPIKeyChecking() optionParams

WithDisableAPIKeyChecking disables the API key checking

func WithFeatures

func WithFeatures(features ...Features) optionParams

WithFeatures sets a features to the forwarder

func WithResolvers

func WithResolvers() optionParams

WithResolvers enables the forwarder to use resolvers

Types

type Component

type Component interface {
	Forwarder
}

Component is the component type.

type Features

type Features uint8

Features is a bitmask to enable specific forwarder features

const (
	// CoreFeatures bitmask to enable specific core features
	CoreFeatures Features = 1 << iota
	// TraceFeatures bitmask to enable specific trace features
	TraceFeatures
	// ProcessFeatures bitmask to enable specific process features
	ProcessFeatures
	// SysProbeFeatures bitmask to enable specific system-probe features
	SysProbeFeatures
)

func ClearFeature

func ClearFeature(features, flag Features) Features

ClearFeature clears forwarder features from a feature set

func SetFeature

func SetFeature(features, flag Features) Features

SetFeature sets forwarder features in a feature set

func ToggleFeature

func ToggleFeature(features, flag Features) Features

ToggleFeature toggles forwarder features in a feature set

type Forwarder

type Forwarder interface {
	SubmitV1Series(payload transaction.BytesPayloads, extra http.Header) error
	SubmitV1Intake(payload transaction.BytesPayloads, kind transaction.Kind, extra http.Header) error
	SubmitV1CheckRuns(payload transaction.BytesPayloads, extra http.Header) error
	SubmitHostMetadata(payload transaction.BytesPayloads, extra http.Header) error
	SubmitAgentChecksMetadata(payload transaction.BytesPayloads, extra http.Header) error
	SubmitMetadata(payload transaction.BytesPayloads, extra http.Header) error
	SubmitProcessChecks(payload transaction.BytesPayloads, extra http.Header) (chan Response, error)
	SubmitProcessDiscoveryChecks(payload transaction.BytesPayloads, extra http.Header) (chan Response, error)
	SubmitRTProcessChecks(payload transaction.BytesPayloads, extra http.Header) (chan Response, error)
	SubmitContainerChecks(payload transaction.BytesPayloads, extra http.Header) (chan Response, error)
	SubmitRTContainerChecks(payload transaction.BytesPayloads, extra http.Header) (chan Response, error)
	SubmitConnectionChecks(payload transaction.BytesPayloads, extra http.Header) (chan Response, error)
	SubmitOrchestratorChecks(payload transaction.BytesPayloads, extra http.Header, payloadType int) error
	SubmitOrchestratorManifests(payload transaction.BytesPayloads, extra http.Header) error
	SubmitV1IntakeDirect(ctx context.Context, payload transaction.BytesPayloads, kind transaction.Kind, extra http.Header) error

	ForwarderV2
}

Forwarder interface allows packages to send payload to the backend

type ForwarderV2

type ForwarderV2 interface {
	GetDomainResolvers() []resolver.DomainResolver
	SubmitTransaction(*transaction.HTTPTransaction) error
}

ForwarderV2 is a minimalist forwarder interface that is product agnostic.

type Params

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

Params contains the parameters to create a forwarder.

func NewParams

func NewParams(options ...optionParams) Params

NewParams initializes a new Params struct

func (Params) APIKeyCheckingDisabledOverride

func (p Params) APIKeyCheckingDisabledOverride() option.Option[bool]

APIKeyCheckingDisabledOverride returns the override for DisableAPIKeyChecking

func (Params) EnabledFeatures

func (p Params) EnabledFeatures() []Features

EnabledFeatures returns the features to enable on the forwarder

func (Params) Resolver

func (p Params) Resolver() bool

Resolver returns whether the forwarder should use resolvers

type Response

type Response struct {
	Domain     string
	Body       []byte
	StatusCode int
	Err        error
}

Response contains the response details of a successfully posted transaction

Jump to

Keyboard shortcuts

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