ackextension

package module
v0.99.0 Latest Latest
Warning

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

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

README

Ack Extension

Status
Stability alpha
Distributions contrib
Issues Open issues Closed issues
Code Owners @zpzhuSplunk, @splunkericl

This extension allows acking of data upon successful processing. The upstream agent can choose to send event again if ack fails.

Configuration

extensions:
  ack:
    storage:
    max_number_of_partition: 1000000
    max_number_of_pending_acks_per_partition: 1000000

receivers:
  splunk_hec:
    ack_extension: ack

service:
  extensions: [ack]
  pipelines:
    logs:
      receivers: [splunk_hec]

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() extension.Factory

NewFactory creates a factory for ack extension.

Types

type AckExtension

type AckExtension interface {
	// ProcessEvent marks the beginning of processing an event. It generates an ack ID for the associated partition ID.
	// ACK IDs are only unique within a partition. Two partitions can have the same ACK IDs, but they are generated for different events.
	ProcessEvent(partitionID string) (ackID uint64)

	// Ack acknowledges an event has been processed.
	Ack(partitionID string, ackID uint64)

	// QueryAcks checks the statuses of given ackIDs for a partition.
	// ackIDs that are not generated from ProcessEvent or have been removed as a result of previous calls to QueryAcks will return false.
	QueryAcks(partitionID string, ackIDs []uint64) map[uint64]bool
}

AckExtension is an extension that can be used by other otel components to support acking of data and can be queried against to check the status of given ack ids.

type Config

type Config struct {
	// StorageID defines the storage type of the extension. In-memory type is set by default (if not provided). Future consideration is disk type.
	StorageID *component.ID `mapstructure:"storage"`
	// MaxNumPartition Specifies the maximum number of partitions that clients can acquire for this extension instance.
	// Implementation defines how limit exceeding should be handled.
	MaxNumPartition uint64 `mapstructure:"max_number_of_partition"`
	// MaxNumPendingAcksPerPartition Specifies the maximum number of ackIDs and their corresponding status information that are waiting to be queried in each partition.
	MaxNumPendingAcksPerPartition uint64 `mapstructure:"max_number_of_pending_acks_per_partition"`
}

Config defines configuration for ack extension

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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