package
3.5.1
Repository: https://github.com/datadog/go-libddwaf.git
Documentation: pkg.go.dev

# Functions

NewTimer creates a new Timer with the given options.
NewTreeTimer creates a new Timer with the given options.
WithBudget is an Option that sets the budget value.
WithComponents is an Option that adds multiple components to the components list.
WithInheritedBudget is an Option that sets the DynamicBudget flag on config.budget.
WithInheritedSumBudget is an Option that sets the DynamicBudget flag on config.budget and sets the DynamicBudgetFunc to sum the remaining time of all children.
WithUnlimitedBudget is an Option that sets the UnlimitedBudget flag on config.budget.

# Constants

DynamicBudget is a special value for the budget that means the timer should inherit the budget from its parent It is the default value if no options such as WithBudget, WithUnlimitedBudget or WithInheritedBudget are provided.
UnlimitedBudget is a special value for the budget that means the timer has no budget.

# Interfaces

NodeTimer is the interface for tree timers.
SumTimer is a sub-interface for timers capable of having children and making the sum of their time spent.
Timer is the default interface for all timers.

# Type aliases

DynamicBudgetFunc is a function that is called on all children when a change to the parent happens.
Option are the configuration options for any type of timer.