Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AtomicU64 ¶
type AtomicU64 uint64
AtomicU64 can be used to perform atomic operations on an uint64 type
type Context ¶
type Context struct{}
Context is a WAF execution context.
func NewContext ¶
NewContext a new WAF context and increase the number of references to the WAF handle. A nil value is returned when the WAF handle can no longer be used or the WAF context couldn't be created.
func (*Context) Close ¶
func (*Context) Close()
Close the WAF context by releasing its C memory and decreasing the number of references to the WAF handle.
func (*Context) TotalRuntime ¶
TotalRuntime returns the cumulated waf runtime across various run calls within the same WAF context. Returned time is in nanoseconds.
func (*Context) TotalTimeouts ¶
TotalTimeouts returns the cumulated amount of WAF timeouts across various run calls within the same WAF context.
type Handle ¶
type Handle struct{}
Handle represents an instance of the WAF for a given ruleset.
func (*Handle) Close ¶
func (*Handle) Close()
Close the WAF and release the underlying C memory as soon as there are no more WAF contexts using the rule.
func (*Handle) RulesetInfo ¶
func (waf *Handle) RulesetInfo() RulesetInfo
RulesetInfo returns the rules initialization metrics for the current WAF handle
type RulesetInfo ¶
type RulesetInfo struct { // Number of rules successfully loaded Loaded uint16 // Number of rules which failed to parse Failed uint16 // Map from an error string to an array of all the rule ids for which // that error was raised. {error: [rule_ids]} Errors map[string]interface{} // Ruleset version Version string }
RulesetInfo stores the information - provided by the WAF - about WAF rules initialization.
Directories ¶
Path | Synopsis |
---|---|
Package include is required to help go tools support vendoring.
|
Package include is required to help go tools support vendoring. |
lib
|
|
darwin-amd64
Package vendor is required to help go tools support vendoring.
|
Package vendor is required to help go tools support vendoring. |
linux-amd64
Package vendor is required to help go tools support vendoring.
|
Package vendor is required to help go tools support vendoring. |