Documentation ¶
Index ¶
- func GetInteractshURLSFromEvent(event map[string]interface{}) []string
- type StopAtFirstMatchHandler
- func (h *StopAtFirstMatchHandler[T]) Acquire()
- func (h *StopAtFirstMatchHandler[T]) CombinedResults() []T
- func (h *StopAtFirstMatchHandler[T]) Done() <-chan struct{}
- func (h *StopAtFirstMatchHandler[T]) FoundFirstMatch() bool
- func (h *StopAtFirstMatchHandler[T]) MatchCallback(fn func())
- func (h *StopAtFirstMatchHandler[T]) Release()
- func (h *StopAtFirstMatchHandler[T]) Trigger()
- func (h *StopAtFirstMatchHandler[T]) Wait()
- type WorkPoolType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetInteractshURLSFromEvent ¶
if template contains more than 1 request and matchers require requestcondition from both requests , then we need to request for event from interactsh even if current request doesnot use interactsh url in it
Types ¶
type StopAtFirstMatchHandler ¶ added in v3.2.0
type StopAtFirstMatchHandler[T any] struct { // Result Channel ResultChan chan T // contains filtered or unexported fields }
StopAtFirstMatchHandler is a handler that executes request and stops on first match
func NewBlockingSPMHandler ¶ added in v3.2.0
func NewBlockingSPMHandler[T any](ctx context.Context, size int, spm bool) *StopAtFirstMatchHandler[T]
NewBlockingSPMHandler creates a new stop at first match handler
func NewNonBlockingSPMHandler ¶ added in v3.2.0
func NewNonBlockingSPMHandler[T any](ctx context.Context, spm bool) *StopAtFirstMatchHandler[T]
NewNonBlockingSPMHandler creates a new stop at first match handler
func (*StopAtFirstMatchHandler[T]) Acquire ¶ added in v3.2.0
func (h *StopAtFirstMatchHandler[T]) Acquire()
Acquire acquires a new work
func (*StopAtFirstMatchHandler[T]) CombinedResults ¶ added in v3.2.0
func (h *StopAtFirstMatchHandler[T]) CombinedResults() []T
CombinedResults returns the combined results
func (*StopAtFirstMatchHandler[T]) Done ¶ added in v3.2.0
func (h *StopAtFirstMatchHandler[T]) Done() <-chan struct{}
Done returns a channel with the context done signal when stop at first match is detected
func (*StopAtFirstMatchHandler[T]) FoundFirstMatch ¶ added in v3.2.0
func (h *StopAtFirstMatchHandler[T]) FoundFirstMatch() bool
FoundFirstMatch returns true if first match was found in stop at first match mode
func (*StopAtFirstMatchHandler[T]) MatchCallback ¶ added in v3.2.0
func (h *StopAtFirstMatchHandler[T]) MatchCallback(fn func())
MatchCallback is called when a match is found input fn should be the callback that is intended to be called if stop at first is enabled and other conditions are met if it does not meet above conditions, use of this function is discouraged
func (*StopAtFirstMatchHandler[T]) Release ¶ added in v3.2.0
func (h *StopAtFirstMatchHandler[T]) Release()
Release releases a work
func (*StopAtFirstMatchHandler[T]) Trigger ¶ added in v3.2.0
func (h *StopAtFirstMatchHandler[T]) Trigger()
Trigger triggers the stop at first match handler and stops the execution of existing requests
func (*StopAtFirstMatchHandler[T]) Wait ¶ added in v3.2.0
func (h *StopAtFirstMatchHandler[T]) Wait()
Wait waits for all work to be done
type WorkPoolType ¶ added in v3.2.0
type WorkPoolType uint
WorkPoolType is the type of work pool to use
const ( // Blocking blocks addition of new work when the pool is full Blocking WorkPoolType = iota // NonBlocking does not block addition of new work when the pool is full NonBlocking )