httputils

package
v3.3.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2024 License: MIT Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetInteractshURLSFromEvent

func GetInteractshURLSFromEvent(event map[string]interface{}) []string

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 comparable] 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 comparable](ctx context.Context, size int, maxResults int, spm bool) *StopAtFirstMatchHandler[T]

NewBlockingSPMHandler creates a new stop at first match handler

func NewNonBlockingSPMHandler added in v3.2.0

func NewNonBlockingSPMHandler[T comparable](ctx context.Context, maxResults int, 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]) Cancel added in v3.2.5

func (h *StopAtFirstMatchHandler[T]) Cancel()

Cancel cancels spm context

func (*StopAtFirstMatchHandler[T]) Cancelled added in v3.2.5

func (h *StopAtFirstMatchHandler[T]) Cancelled() bool

Cancelled returns true if the context is cancelled

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]) Resize added in v3.2.5

func (h *StopAtFirstMatchHandler[T]) Resize(ctx context.Context, size int) error

func (*StopAtFirstMatchHandler[T]) SetOnResultCallback added in v3.2.5

func (h *StopAtFirstMatchHandler[T]) SetOnResultCallback(fn func(T))

SetOnResult callback this is not thread safe

func (*StopAtFirstMatchHandler[T]) Size added in v3.2.5

func (h *StopAtFirstMatchHandler[T]) Size() int

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
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL