processors

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewChangeNamespace

func NewChangeNamespace[T models.TokenConstraint](source, destination *string) processor[T]

NewChangeNamespace creates new changeNamespace

func NewExpirationSetter

func NewExpirationSetter[T models.TokenConstraint](expired *atomic.Uint64, extraTTL int64, logger *slog.Logger,
) processor[T]

NewExpirationSetter creates a new expirationSetter processor

func NewFilterByBin

func NewFilterByBin[T models.TokenConstraint](binList []string, skipped *atomic.Uint64) processor[T]

NewFilterByBin creates new filterByBin processor with given binList.

func NewFilterBySet

func NewFilterBySet[T models.TokenConstraint](setList []string, skipped *atomic.Uint64) processor[T]

NewFilterBySet creates new filterBySet processor with given setList.

func NewFilterByType

func NewFilterByType[T models.TokenConstraint](noRecords, noIndexes, noUdf bool) processor[T]

NewFilterByType creates new filterByType processor

func NewNoop

func NewNoop[T models.TokenConstraint]() processor[T]

func NewRecordCounter

func NewRecordCounter[T models.TokenConstraint](counter *atomic.Uint64) processor[T]

func NewSizeCounter

func NewSizeCounter[T models.TokenConstraint](counter *atomic.Uint64) processor[T]

func NewTPSLimiter

func NewTPSLimiter[T models.TokenConstraint](ctx context.Context, n int) processor[T]

NewTPSLimiter Create a new TPS limiter. n — allowed number of tokens per second, n = 0 means no limit.

func NewTokenCounter

func NewTokenCounter[T models.TokenConstraint](counter *atomic.Uint64) processor[T]

NewTokenCounter returns new token counter.

func NewVoidTimeSetter

func NewVoidTimeSetter[T models.TokenConstraint](logger *slog.Logger) processor[T]

NewVoidTimeSetter creates a new VoidTimeProcessor

Types

type TokenCounter

type TokenCounter[T models.TokenConstraint] struct {
	// contains filtered or unexported fields
}

TokenCounter count processed tokens. It's like a record counter but for XDR. This counter will count the number of received XDR payloads.

func (TokenCounter[T]) Process

func (c TokenCounter[T]) Process(token T) (T, error)

Jump to

Keyboard shortcuts

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