selectorvalidator

package
Version: v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2021 License: Apache-2.0, MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidLimit means this type of recursive selector limit is not supported by default
	// -- to prevent DDOS attacks
	ErrInvalidLimit = errors.New("unsupported recursive selector limit")
)

Functions

func SelectorValidator

func SelectorValidator(maxAcceptedDepth int64) graphsync.OnIncomingRequestHook

SelectorValidator returns an OnRequestReceivedHook that only validates requests if their selector only has no recursions that are greater than maxAcceptedDepth

func ValidateMaxRecursionDepth

func ValidateMaxRecursionDepth(node ld.Node, maxAcceptedDepth int64) error

ValidateMaxRecursionDepth examines the given selector node and verifies recursive selectors are limited to the given fixed depth

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL