Documentation ¶
Overview ¶
Package defaultforwarder implements a component to send payloads to the backend
Index ¶
- Constants
- func HasFeature(features, flag Features) bool
- func MockModule() fxutil.Module
- func ModulWithOptionTMP(option fx.Option) fxutil.Module
- func Module(params Params) fxutil.Module
- func NewForwarder(config config.Component, log log.Component, lc fx.Lifecycle, ...) provides
- func NewHTTPClient(config config.Component) *http.Client
- func WithDisableAPIKeyChecking() option
- func WithFeatures(features ...Features) option
- func WithNoopForwarder() option
- func WithResolvers() option
- type Component
- type DefaultForwarder
- func (f *DefaultForwarder) Start() error
- func (f *DefaultForwarder) State() uint32
- func (f *DefaultForwarder) Stop()
- func (f *DefaultForwarder) SubmitAgentChecksMetadata(payload transaction.BytesPayloads, extra http.Header) error
- func (f *DefaultForwarder) SubmitConnectionChecks(payload transaction.BytesPayloads, extra http.Header) (chan Response, error)
- func (f *DefaultForwarder) SubmitContainerChecks(payload transaction.BytesPayloads, extra http.Header) (chan Response, error)
- func (f *DefaultForwarder) SubmitHostMetadata(payload transaction.BytesPayloads, extra http.Header) error
- func (f *DefaultForwarder) SubmitMetadata(payload transaction.BytesPayloads, extra http.Header) error
- func (f *DefaultForwarder) SubmitOrchestratorChecks(payload transaction.BytesPayloads, extra http.Header, payloadType int) (chan Response, error)
- func (f *DefaultForwarder) SubmitOrchestratorManifests(payload transaction.BytesPayloads, extra http.Header) (chan Response, error)
- func (f *DefaultForwarder) SubmitProcessChecks(payload transaction.BytesPayloads, extra http.Header) (chan Response, error)
- func (f *DefaultForwarder) SubmitProcessDiscoveryChecks(payload transaction.BytesPayloads, extra http.Header) (chan Response, error)
- func (f *DefaultForwarder) SubmitProcessEventChecks(payload transaction.BytesPayloads, extra http.Header) (chan Response, error)
- func (f *DefaultForwarder) SubmitRTContainerChecks(payload transaction.BytesPayloads, extra http.Header) (chan Response, error)
- func (f *DefaultForwarder) SubmitRTProcessChecks(payload transaction.BytesPayloads, extra http.Header) (chan Response, error)
- func (f *DefaultForwarder) SubmitSeries(payloads transaction.BytesPayloads, extra http.Header) error
- func (f *DefaultForwarder) SubmitSketchSeries(payload transaction.BytesPayloads, extra http.Header) error
- func (f *DefaultForwarder) SubmitV1CheckRuns(payload transaction.BytesPayloads, extra http.Header) error
- func (f *DefaultForwarder) SubmitV1Intake(payload transaction.BytesPayloads, kind transaction.Kind, extra http.Header) error
- func (f *DefaultForwarder) SubmitV1Series(payloads transaction.BytesPayloads, extra http.Header) error
- type Features
- type Forwarder
- type Mock
- type NoopForwarder
- func (f NoopForwarder) Start() error
- func (f NoopForwarder) Stop()
- func (f NoopForwarder) SubmitAgentChecksMetadata(_ transaction.BytesPayloads, _ http.Header) error
- func (f NoopForwarder) SubmitConnectionChecks(_ transaction.BytesPayloads, _ http.Header) (chan Response, error)
- func (f NoopForwarder) SubmitContainerChecks(_ transaction.BytesPayloads, _ http.Header) (chan Response, error)
- func (f NoopForwarder) SubmitHostMetadata(_ transaction.BytesPayloads, _ http.Header) error
- func (f NoopForwarder) SubmitMetadata(_ transaction.BytesPayloads, _ http.Header) error
- func (f NoopForwarder) SubmitOrchestratorChecks(_ transaction.BytesPayloads, _ http.Header, _ int) (chan Response, error)
- func (f NoopForwarder) SubmitOrchestratorManifests(_ transaction.BytesPayloads, _ http.Header) (chan Response, error)
- func (f NoopForwarder) SubmitProcessChecks(_ transaction.BytesPayloads, _ http.Header) (chan Response, error)
- func (f NoopForwarder) SubmitProcessDiscoveryChecks(_ transaction.BytesPayloads, _ http.Header) (chan Response, error)
- func (f NoopForwarder) SubmitProcessEventChecks(_ transaction.BytesPayloads, _ http.Header) (chan Response, error)
- func (f NoopForwarder) SubmitRTContainerChecks(_ transaction.BytesPayloads, _ http.Header) (chan Response, error)
- func (f NoopForwarder) SubmitRTProcessChecks(_ transaction.BytesPayloads, _ http.Header) (chan Response, error)
- func (f NoopForwarder) SubmitSeries(_ transaction.BytesPayloads, _ http.Header) error
- func (f NoopForwarder) SubmitSketchSeries(_ transaction.BytesPayloads, _ http.Header) error
- func (f NoopForwarder) SubmitV1CheckRuns(_ transaction.BytesPayloads, _ http.Header) error
- func (f NoopForwarder) SubmitV1Intake(_ transaction.BytesPayloads, _ transaction.Kind, _ http.Header) error
- func (f NoopForwarder) SubmitV1Series(_ transaction.BytesPayloads, _ http.Header) error
- type Options
- type Params
- type PointSuccessfullySent
- type Response
- type SyncForwarder
- func (f *SyncForwarder) Start() error
- func (f *SyncForwarder) Stop()
- func (f *SyncForwarder) SubmitAgentChecksMetadata(payload transaction.BytesPayloads, extra http.Header) error
- func (f *SyncForwarder) SubmitConnectionChecks(payload transaction.BytesPayloads, extra http.Header) (chan Response, error)
- func (f *SyncForwarder) SubmitContainerChecks(payload transaction.BytesPayloads, extra http.Header) (chan Response, error)
- func (f *SyncForwarder) SubmitHostMetadata(payload transaction.BytesPayloads, extra http.Header) error
- func (f *SyncForwarder) SubmitMetadata(payload transaction.BytesPayloads, extra http.Header) error
- func (f *SyncForwarder) SubmitOrchestratorChecks(payload transaction.BytesPayloads, extra http.Header, payloadType int) (chan Response, error)
- func (f *SyncForwarder) SubmitOrchestratorManifests(payload transaction.BytesPayloads, extra http.Header) (chan Response, error)
- func (f *SyncForwarder) SubmitProcessChecks(payload transaction.BytesPayloads, extra http.Header) (chan Response, error)
- func (f *SyncForwarder) SubmitProcessDiscoveryChecks(payload transaction.BytesPayloads, extra http.Header) (chan Response, error)
- func (f *SyncForwarder) SubmitProcessEventChecks(payload transaction.BytesPayloads, extra http.Header) (chan Response, error)
- func (f *SyncForwarder) SubmitRTContainerChecks(payload transaction.BytesPayloads, extra http.Header) (chan Response, error)
- func (f *SyncForwarder) SubmitRTProcessChecks(payload transaction.BytesPayloads, extra http.Header) (chan Response, error)
- func (f *SyncForwarder) SubmitSeries(payload transaction.BytesPayloads, extra http.Header) error
- func (f *SyncForwarder) SubmitSketchSeries(payload transaction.BytesPayloads, extra http.Header) error
- func (f *SyncForwarder) SubmitV1CheckRuns(payload transaction.BytesPayloads, extra http.Header) error
- func (f *SyncForwarder) SubmitV1Intake(payload transaction.BytesPayloads, kind transaction.Kind, extra http.Header) error
- func (f *SyncForwarder) SubmitV1Series(payload transaction.BytesPayloads, extra http.Header) error
- type Worker
Constants ¶
const ( // Stopped represent the internal state of an unstarted Forwarder. Stopped uint32 = iota // Started represent the internal state of an started Forwarder. Started // Disabled represent the internal state of a disabled Forwarder. Disabled )
Variables ¶
This section is empty.
Functions ¶
func HasFeature ¶
HasFeature lets you know if a specific feature flag is set in a feature set
func MockModule ¶
MockModule defines the fx options for the mock component.
func ModulWithOptionTMP ¶ added in v0.58.0
ModulWithOptionTMP defines the fx options for this component with an option. This is a temporary function to until configsync is cleanup.
func NewForwarder ¶
func NewForwarder(config config.Component, log log.Component, lc fx.Lifecycle, ignoreLifeCycleError bool, options *Options) provides
NewForwarder returns a new forwarder component.
func NewHTTPClient ¶
NewHTTPClient creates a new http.Client
func WithDisableAPIKeyChecking ¶ added in v0.58.0
func WithDisableAPIKeyChecking() option
WithDisableAPIKeyChecking disables the API key checking
func WithFeatures ¶ added in v0.58.0
func WithFeatures(features ...Features) option
WithFeatures sets a features to the forwarder
func WithNoopForwarder ¶ added in v0.58.0
func WithNoopForwarder() option
WithNoopForwarder sets the forwarder to use the noop forwarder
func WithResolvers ¶ added in v0.58.0
func WithResolvers() option
WithResolvers enables the forwarder to use resolvers
Types ¶
type Component ¶
type Component interface { // TODO: (components) When the code of the forwarder will be // in /comp/forwarder move the content of forwarder.Forwarder inside this interface. Forwarder }
Component is the component type.
type DefaultForwarder ¶
type DefaultForwarder struct { // NumberOfWorkers Number of concurrent HTTP request made by the DefaultForwarder (default 4). NumberOfWorkers int // contains filtered or unexported fields }
DefaultForwarder is the default implementation of the Forwarder.
func NewDefaultForwarder ¶
func NewDefaultForwarder(config config.Component, log log.Component, options *Options) *DefaultForwarder
NewDefaultForwarder returns a new DefaultForwarder. TODO: (components) Remove this method and other exported methods in comp/forwarder.
func (*DefaultForwarder) Start ¶
func (f *DefaultForwarder) Start() error
Start initialize and runs the forwarder.
func (*DefaultForwarder) State ¶
func (f *DefaultForwarder) State() uint32
State returns the internal state of the forwarder (Started or Stopped)
func (*DefaultForwarder) Stop ¶
func (f *DefaultForwarder) Stop()
Stop all the component of a forwarder and free resources
func (*DefaultForwarder) SubmitAgentChecksMetadata ¶
func (f *DefaultForwarder) SubmitAgentChecksMetadata(payload transaction.BytesPayloads, extra http.Header) error
SubmitAgentChecksMetadata will send a agentchecks_metadata tag type payload to Datadog backend.
func (*DefaultForwarder) SubmitConnectionChecks ¶
func (f *DefaultForwarder) SubmitConnectionChecks(payload transaction.BytesPayloads, extra http.Header) (chan Response, error)
SubmitConnectionChecks sends connection checks
func (*DefaultForwarder) SubmitContainerChecks ¶
func (f *DefaultForwarder) SubmitContainerChecks(payload transaction.BytesPayloads, extra http.Header) (chan Response, error)
SubmitContainerChecks sends container checks
func (*DefaultForwarder) SubmitHostMetadata ¶
func (f *DefaultForwarder) SubmitHostMetadata(payload transaction.BytesPayloads, extra http.Header) error
SubmitHostMetadata will send a host_metadata tag type payload to Datadog backend.
func (*DefaultForwarder) SubmitMetadata ¶
func (f *DefaultForwarder) SubmitMetadata(payload transaction.BytesPayloads, extra http.Header) error
SubmitMetadata will send a metadata type payload to Datadog backend.
func (*DefaultForwarder) SubmitOrchestratorChecks ¶
func (f *DefaultForwarder) SubmitOrchestratorChecks(payload transaction.BytesPayloads, extra http.Header, payloadType int) (chan Response, error)
SubmitOrchestratorChecks sends orchestrator checks
func (*DefaultForwarder) SubmitOrchestratorManifests ¶
func (f *DefaultForwarder) SubmitOrchestratorManifests(payload transaction.BytesPayloads, extra http.Header) (chan Response, error)
SubmitOrchestratorManifests sends orchestrator manifests
func (*DefaultForwarder) SubmitProcessChecks ¶
func (f *DefaultForwarder) SubmitProcessChecks(payload transaction.BytesPayloads, extra http.Header) (chan Response, error)
SubmitProcessChecks sends process checks
func (*DefaultForwarder) SubmitProcessDiscoveryChecks ¶
func (f *DefaultForwarder) SubmitProcessDiscoveryChecks(payload transaction.BytesPayloads, extra http.Header) (chan Response, error)
SubmitProcessDiscoveryChecks sends process discovery checks
func (*DefaultForwarder) SubmitProcessEventChecks ¶
func (f *DefaultForwarder) SubmitProcessEventChecks(payload transaction.BytesPayloads, extra http.Header) (chan Response, error)
SubmitProcessEventChecks sends process events checks
func (*DefaultForwarder) SubmitRTContainerChecks ¶
func (f *DefaultForwarder) SubmitRTContainerChecks(payload transaction.BytesPayloads, extra http.Header) (chan Response, error)
SubmitRTContainerChecks sends real time container checks
func (*DefaultForwarder) SubmitRTProcessChecks ¶
func (f *DefaultForwarder) SubmitRTProcessChecks(payload transaction.BytesPayloads, extra http.Header) (chan Response, error)
SubmitRTProcessChecks sends real time process checks
func (*DefaultForwarder) SubmitSeries ¶
func (f *DefaultForwarder) SubmitSeries(payloads transaction.BytesPayloads, extra http.Header) error
SubmitSeries will send timeseries to the v2 endpoint
func (*DefaultForwarder) SubmitSketchSeries ¶
func (f *DefaultForwarder) SubmitSketchSeries(payload transaction.BytesPayloads, extra http.Header) error
SubmitSketchSeries will send payloads to Datadog backend - PROTOTYPE FOR PERCENTILE
func (*DefaultForwarder) SubmitV1CheckRuns ¶
func (f *DefaultForwarder) SubmitV1CheckRuns(payload transaction.BytesPayloads, extra http.Header) error
SubmitV1CheckRuns will send service checks to v1 endpoint (this will be removed once the backend handles v2 endpoints).
func (*DefaultForwarder) SubmitV1Intake ¶
func (f *DefaultForwarder) SubmitV1Intake(payload transaction.BytesPayloads, kind transaction.Kind, extra http.Header) error
SubmitV1Intake will send payloads to the universal `/intake/` endpoint used by Agent v.5
func (*DefaultForwarder) SubmitV1Series ¶
func (f *DefaultForwarder) SubmitV1Series(payloads transaction.BytesPayloads, extra http.Header) error
SubmitV1Series will send timeserie to v1 endpoint (this will be remove once the backend handles v2 endpoints).
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 ¶
ClearFeature clears forwarder features from a feature set
func SetFeature ¶
SetFeature sets forwarder features in a feature set
func ToggleFeature ¶
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 SubmitSeries(payload transaction.BytesPayloads, extra http.Header) error SubmitSketchSeries(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) SubmitProcessEventChecks(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) (chan Response, error) SubmitOrchestratorManifests(payload transaction.BytesPayloads, extra http.Header) (chan Response, error) }
Forwarder interface allows packages to send payload to the backend
type NoopForwarder ¶
type NoopForwarder struct{}
NoopForwarder is a Forwarder doing nothing and not returning any responses.
func (NoopForwarder) SubmitAgentChecksMetadata ¶
func (f NoopForwarder) SubmitAgentChecksMetadata(_ transaction.BytesPayloads, _ http.Header) error
SubmitAgentChecksMetadata does nothing.
func (NoopForwarder) SubmitConnectionChecks ¶
func (f NoopForwarder) SubmitConnectionChecks(_ transaction.BytesPayloads, _ http.Header) (chan Response, error)
SubmitConnectionChecks does nothing.
func (NoopForwarder) SubmitContainerChecks ¶
func (f NoopForwarder) SubmitContainerChecks(_ transaction.BytesPayloads, _ http.Header) (chan Response, error)
SubmitContainerChecks does nothing.
func (NoopForwarder) SubmitHostMetadata ¶
func (f NoopForwarder) SubmitHostMetadata(_ transaction.BytesPayloads, _ http.Header) error
SubmitHostMetadata does nothing.
func (NoopForwarder) SubmitMetadata ¶
func (f NoopForwarder) SubmitMetadata(_ transaction.BytesPayloads, _ http.Header) error
SubmitMetadata does nothing.
func (NoopForwarder) SubmitOrchestratorChecks ¶
func (f NoopForwarder) SubmitOrchestratorChecks(_ transaction.BytesPayloads, _ http.Header, _ int) (chan Response, error)
SubmitOrchestratorChecks does nothing.
func (NoopForwarder) SubmitOrchestratorManifests ¶
func (f NoopForwarder) SubmitOrchestratorManifests(_ transaction.BytesPayloads, _ http.Header) (chan Response, error)
SubmitOrchestratorManifests does nothing.
func (NoopForwarder) SubmitProcessChecks ¶
func (f NoopForwarder) SubmitProcessChecks(_ transaction.BytesPayloads, _ http.Header) (chan Response, error)
SubmitProcessChecks does nothing.
func (NoopForwarder) SubmitProcessDiscoveryChecks ¶
func (f NoopForwarder) SubmitProcessDiscoveryChecks(_ transaction.BytesPayloads, _ http.Header) (chan Response, error)
SubmitProcessDiscoveryChecks does nothing.
func (NoopForwarder) SubmitProcessEventChecks ¶
func (f NoopForwarder) SubmitProcessEventChecks(_ transaction.BytesPayloads, _ http.Header) (chan Response, error)
SubmitProcessEventChecks does nothing
func (NoopForwarder) SubmitRTContainerChecks ¶
func (f NoopForwarder) SubmitRTContainerChecks(_ transaction.BytesPayloads, _ http.Header) (chan Response, error)
SubmitRTContainerChecks does nothing.
func (NoopForwarder) SubmitRTProcessChecks ¶
func (f NoopForwarder) SubmitRTProcessChecks(_ transaction.BytesPayloads, _ http.Header) (chan Response, error)
SubmitRTProcessChecks does nothing.
func (NoopForwarder) SubmitSeries ¶
func (f NoopForwarder) SubmitSeries(_ transaction.BytesPayloads, _ http.Header) error
SubmitSeries does nothing.
func (NoopForwarder) SubmitSketchSeries ¶
func (f NoopForwarder) SubmitSketchSeries(_ transaction.BytesPayloads, _ http.Header) error
SubmitSketchSeries does nothing.
func (NoopForwarder) SubmitV1CheckRuns ¶
func (f NoopForwarder) SubmitV1CheckRuns(_ transaction.BytesPayloads, _ http.Header) error
SubmitV1CheckRuns does nothing.
func (NoopForwarder) SubmitV1Intake ¶
func (f NoopForwarder) SubmitV1Intake(_ transaction.BytesPayloads, _ transaction.Kind, _ http.Header) error
SubmitV1Intake does nothing.
func (NoopForwarder) SubmitV1Series ¶
func (f NoopForwarder) SubmitV1Series(_ transaction.BytesPayloads, _ http.Header) error
SubmitV1Series does nothing.
type Options ¶
type Options struct { NumberOfWorkers int RetryQueuePayloadsTotalMaxSize int DisableAPIKeyChecking bool EnabledFeatures Features APIKeyValidationInterval time.Duration DomainResolvers map[string]resolver.DomainResolver ConnectionResetInterval time.Duration CompletionHandler transaction.HTTPCompletionHandler }
Options contain the configuration options for the DefaultForwarder
func NewOptions ¶
func NewOptions(config config.Component, log log.Component, keysPerDomain map[string][]string) *Options
NewOptions creates new Options with default values
func NewOptionsWithResolvers ¶
func NewOptionsWithResolvers(config config.Component, log log.Component, domainResolvers map[string]resolver.DomainResolver) *Options
NewOptionsWithResolvers creates new Options with default values
func (*Options) SetEnabledFeatures ¶ added in v0.58.0
SetEnabledFeatures sets the features enabled
type Params ¶
type Params struct {
// contains filtered or unexported fields
}
Params contains the parameters to create a forwarder.
type PointSuccessfullySent ¶
type PointSuccessfullySent interface {
OnPointSuccessfullySent(int)
}
PointSuccessfullySent is called when sending successfully a point to the intake.
type SyncForwarder ¶
type SyncForwarder struct {
// contains filtered or unexported fields
}
SyncForwarder is a very simple Forwarder synchronously sending the data to the intake.
func NewSyncForwarder ¶
func NewSyncForwarder(config config.Component, log log.Component, keysPerDomain map[string][]string, timeout time.Duration) *SyncForwarder
NewSyncForwarder returns a new synchronous forwarder.
func (*SyncForwarder) Start ¶
func (f *SyncForwarder) Start() error
Start starts the sync forwarder: nothing to do.
func (*SyncForwarder) Stop ¶
func (f *SyncForwarder) Stop()
Stop stops the sync forwarder: nothing to do.
func (*SyncForwarder) SubmitAgentChecksMetadata ¶
func (f *SyncForwarder) SubmitAgentChecksMetadata(payload transaction.BytesPayloads, extra http.Header) error
SubmitAgentChecksMetadata will send a agentchecks_metadata tag type payload to Datadog backend.
func (*SyncForwarder) SubmitConnectionChecks ¶
func (f *SyncForwarder) SubmitConnectionChecks(payload transaction.BytesPayloads, extra http.Header) (chan Response, error)
SubmitConnectionChecks sends connection checks
func (*SyncForwarder) SubmitContainerChecks ¶
func (f *SyncForwarder) SubmitContainerChecks(payload transaction.BytesPayloads, extra http.Header) (chan Response, error)
SubmitContainerChecks sends container checks
func (*SyncForwarder) SubmitHostMetadata ¶
func (f *SyncForwarder) SubmitHostMetadata(payload transaction.BytesPayloads, extra http.Header) error
SubmitHostMetadata will send a host_metadata tag type payload to Datadog backend.
func (*SyncForwarder) SubmitMetadata ¶
func (f *SyncForwarder) SubmitMetadata(payload transaction.BytesPayloads, extra http.Header) error
SubmitMetadata will send a metadata type payload to Datadog backend.
func (*SyncForwarder) SubmitOrchestratorChecks ¶
func (f *SyncForwarder) SubmitOrchestratorChecks(payload transaction.BytesPayloads, extra http.Header, payloadType int) (chan Response, error)
SubmitOrchestratorChecks sends orchestrator checks
func (*SyncForwarder) SubmitOrchestratorManifests ¶
func (f *SyncForwarder) SubmitOrchestratorManifests(payload transaction.BytesPayloads, extra http.Header) (chan Response, error)
SubmitOrchestratorManifests sends orchestrator manifests
func (*SyncForwarder) SubmitProcessChecks ¶
func (f *SyncForwarder) SubmitProcessChecks(payload transaction.BytesPayloads, extra http.Header) (chan Response, error)
SubmitProcessChecks sends process checks
func (*SyncForwarder) SubmitProcessDiscoveryChecks ¶
func (f *SyncForwarder) SubmitProcessDiscoveryChecks(payload transaction.BytesPayloads, extra http.Header) (chan Response, error)
SubmitProcessDiscoveryChecks sends process discovery checks
func (*SyncForwarder) SubmitProcessEventChecks ¶
func (f *SyncForwarder) SubmitProcessEventChecks(payload transaction.BytesPayloads, extra http.Header) (chan Response, error)
SubmitProcessEventChecks sends process events checks
func (*SyncForwarder) SubmitRTContainerChecks ¶
func (f *SyncForwarder) SubmitRTContainerChecks(payload transaction.BytesPayloads, extra http.Header) (chan Response, error)
SubmitRTContainerChecks sends real time container checks
func (*SyncForwarder) SubmitRTProcessChecks ¶
func (f *SyncForwarder) SubmitRTProcessChecks(payload transaction.BytesPayloads, extra http.Header) (chan Response, error)
SubmitRTProcessChecks sends real time process checks
func (*SyncForwarder) SubmitSeries ¶
func (f *SyncForwarder) SubmitSeries(payload transaction.BytesPayloads, extra http.Header) error
SubmitSeries will send timeseries to the v2 endpoint
func (*SyncForwarder) SubmitSketchSeries ¶
func (f *SyncForwarder) SubmitSketchSeries(payload transaction.BytesPayloads, extra http.Header) error
SubmitSketchSeries will send payloads to Datadog backend - PROTOTYPE FOR PERCENTILE
func (*SyncForwarder) SubmitV1CheckRuns ¶
func (f *SyncForwarder) SubmitV1CheckRuns(payload transaction.BytesPayloads, extra http.Header) error
SubmitV1CheckRuns will send service checks to v1 endpoint (this will be removed once the backend handles v2 endpoints).
func (*SyncForwarder) SubmitV1Intake ¶
func (f *SyncForwarder) SubmitV1Intake(payload transaction.BytesPayloads, kind transaction.Kind, extra http.Header) error
SubmitV1Intake will send payloads to the universal `/intake/` endpoint used by Agent v.5
func (*SyncForwarder) SubmitV1Series ¶
func (f *SyncForwarder) SubmitV1Series(payload transaction.BytesPayloads, extra http.Header) error
SubmitV1Series will send timeserie to v1 endpoint (this will be remove once the backend handles v2 endpoints).
type Worker ¶
type Worker struct { // Client the http client used to processed transactions. Client *http.Client // HighPrio is the channel used to receive high priority transaction from the Forwarder. HighPrio <-chan transaction.Transaction // LowPrio is the channel used to receive low priority transaction from the Forwarder. LowPrio <-chan transaction.Transaction // RequeueChan is the channel used to send failed transaction back to the Forwarder. RequeueChan chan<- transaction.Transaction // contains filtered or unexported fields }
Worker consumes Transaction (aka transactions) from the Forwarder and processes them. If the transaction fails to be processed the Worker will send it back to the Forwarder to be retried later.
func NewWorker ¶
func NewWorker( config config.Component, log log.Component, highPrioChan <-chan transaction.Transaction, lowPrioChan <-chan transaction.Transaction, requeueChan chan<- transaction.Transaction, blocked *blockedEndpoints, pointSuccessfullySent PointSuccessfullySent, ) *Worker
NewWorker returns a new worker to consume Transaction from inputChan and push back erroneous ones into requeueChan.
func (*Worker) ScheduleConnectionReset ¶
func (w *Worker) ScheduleConnectionReset()
ScheduleConnectionReset allows signaling the worker that all connections should be recreated before sending the next transaction. Returns immediately.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package endpoints stores a collection of `transaction.Endpoint` mainly used by the forwarder package to send data to Datadog using the right request path for a given type of data.
|
Package endpoints stores a collection of `transaction.Endpoint` mainly used by the forwarder package to send data to Datadog using the right request path for a given type of data. |
internal
|
|
retry
Package retry provides retry mechanisms for the forwarder.
|
Package retry provides retry mechanisms for the forwarder. |
Package resolver contains logic to perform per `transaction.Endpoint` domain resolution.
|
Package resolver contains logic to perform per `transaction.Endpoint` domain resolution. |
Package transaction defines the transaction of the forwarder
|
Package transaction defines the transaction of the forwarder |