Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Filter ¶
type Filter interface { // EvaluateURLAndHeaders can be used to evaluate both URL and Headers EvaluateURLAndHeaders(span sdk.Span, url string, headers map[string][]string) bool // EvaluateBody can be used to evaluate the body content EvaluateBody(span sdk.Span, body []byte, headers map[string][]string) bool }
Filter evaluates whether request should be blocked, `true` blocks the request and `false` continues it.
type MultiFilter ¶
type MultiFilter struct {
// contains filtered or unexported fields
}
MultiFilter encapsulates multiple filters
func NewMultiFilter ¶
func NewMultiFilter(filter ...Filter) *MultiFilter
NewMultiFilter creates a new MultiFilter
func (*MultiFilter) EvaluateBody ¶
EvaluateBody runs body evaluators for each filter until one returns true
func (*MultiFilter) EvaluateURLAndHeaders ¶
func (m *MultiFilter) EvaluateURLAndHeaders(span sdk.Span, url string, headers map[string][]string) bool
EvaluateURLAndHeaders runs URL and headers evaluation for each filter until one returns true
type NoopFilter ¶
type NoopFilter struct{}
NoopFilter is a filter that always evaluates to false
func (NoopFilter) EvaluateBody ¶
EvaluateBody that always returns false
func (NoopFilter) EvaluateURLAndHeaders ¶
func (NoopFilter) EvaluateURLAndHeaders(span sdk.Span, url string, headers map[string][]string) bool
EvaluateURLAndHeaders that always returns false
Click to show internal directories.
Click to hide internal directories.