Documentation
¶
Index ¶
- func NewChangeNamespace[T models.TokenConstraint](source, destination *string) processor[T]
- func NewExpirationSetter[T models.TokenConstraint](expired *atomic.Uint64, extraTTL int64, logger *slog.Logger) processor[T]
- func NewFilterByBin[T models.TokenConstraint](binList []string, skipped *atomic.Uint64) processor[T]
- func NewFilterBySet[T models.TokenConstraint](setList []string, skipped *atomic.Uint64) processor[T]
- func NewFilterByType[T models.TokenConstraint](noRecords, noIndexes, noUdf bool) processor[T]
- func NewNoop[T models.TokenConstraint]() processor[T]
- func NewRecordCounter[T models.TokenConstraint](counter *atomic.Uint64) processor[T]
- func NewSizeCounter[T models.TokenConstraint](counter *atomic.Uint64) processor[T]
- func NewTPSLimiter[T models.TokenConstraint](ctx context.Context, n int) processor[T]
- func NewTokenCounter[T models.TokenConstraint](counter *atomic.Uint64) processor[T]
- func NewVoidTimeSetter[T models.TokenConstraint](logger *slog.Logger) processor[T]
- type TokenCounter
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)
Click to show internal directories.
Click to hide internal directories.