waf

package
v2.0.0-beta.8 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: Apache-2.0, BSD-3-Clause, Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunSimple

func RunSimple(ctx context.Context, addrs waf.RunAddressData, errorLog string) error

RunSimple runs the WAF with the given address data and returns an error that should be forwarded to the caller

Types

type ContextArgs

type ContextArgs struct{}

func (ContextArgs) IsArgOf

func (ContextArgs) IsArgOf(*ContextOperation)

type ContextOperation

type ContextOperation struct {
	dyngo.Operation
	*trace.ServiceEntrySpanOperation
	// contains filtered or unexported fields
}

func StartContextOperation

func StartContextOperation(ctx context.Context) (*ContextOperation, context.Context)

func (*ContextOperation) AbsorbDerivatives

func (op *ContextOperation) AbsorbDerivatives(derivatives map[string]any)

func (*ContextOperation) AddEvents

func (op *ContextOperation) AddEvents(events ...any)

func (*ContextOperation) AddStackTraces

func (op *ContextOperation) AddStackTraces(stacks ...*stacktrace.Event)

func (*ContextOperation) Derivatives

func (op *ContextOperation) Derivatives() map[string]any

func (*ContextOperation) Events

func (op *ContextOperation) Events() []any

func (*ContextOperation) Finish

func (op *ContextOperation) Finish(span trace.TagSetter)

func (*ContextOperation) OnEvent

func (op *ContextOperation) OnEvent(event RunEvent)

func (*ContextOperation) Run

func (op *ContextOperation) Run(eventReceiver dyngo.Operation, addrs waf.RunAddressData)

Run runs the WAF with the given address data and sends the results to the event receiver the event receiver can be the same os the method receiver but not always the event receiver is the one that will receive the actions events generated by the WAF

func (*ContextOperation) SetLimiter

func (op *ContextOperation) SetLimiter(limiter limiter.Limiter)

func (*ContextOperation) SetSupportedAddresses

func (op *ContextOperation) SetSupportedAddresses(addrs config.AddressSet)

func (*ContextOperation) StackTraces

func (op *ContextOperation) StackTraces() []*stacktrace.Event

func (*ContextOperation) SwapContext

func (op *ContextOperation) SwapContext(ctx *waf.Context) *waf.Context

type ContextRes

type ContextRes struct{}

func (ContextRes) IsResultOf

func (ContextRes) IsResultOf(*ContextOperation)

type RunEvent

type RunEvent struct {
	waf.RunAddressData
	dyngo.Operation
}

RunEvent is the type of event that should be emitted to child operations to run the WAF

Jump to

Keyboard shortcuts

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