testparsers

package
Version: v1.10.4 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 Imports: 6 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func L7HeaderRuleParser

func L7HeaderRuleParser(rule *cilium.PortNetworkPolicyRule) []L7NetworkPolicyRule

L7HeaderRuleParser parses protobuf L7 rules to and array of HeaderRules

Types

type BlockParser

type BlockParser struct {
	// contains filtered or unexported fields
}

func (*BlockParser) OnData

func (p *BlockParser) OnData(reply, endStream bool, data [][]byte) (OpType, int)

Parses individual blocks that must start with one of: "PASS" the block is passed "DROP" the block is dropped "INJECT" the block is injected in reverse direction "INSERT" the block is injected in current direction

type BlockParserFactory

type BlockParserFactory struct{}

func (*BlockParserFactory) Create

func (p *BlockParserFactory) Create(connection *Connection) interface{}

type HeaderParser

type HeaderParser struct {
	// contains filtered or unexported fields
}

func (*HeaderParser) OnData

func (p *HeaderParser) OnData(reply, endStream bool, data [][]byte) (OpType, int)

Parses individual lines and verifies them against the policy

type HeaderParserFactory

type HeaderParserFactory struct{}

func (*HeaderParserFactory) Create

func (p *HeaderParserFactory) Create(connection *Connection) interface{}

type HeaderRule

type HeaderRule struct {
	// contains filtered or unexported fields
}

func (*HeaderRule) Matches

func (rule *HeaderRule) Matches(data interface{}) bool

Matches returns true if the HeaderRule matches

type LineParser

type LineParser struct {
	// contains filtered or unexported fields
}

func (*LineParser) OnData

func (p *LineParser) OnData(reply, endStream bool, data [][]byte) (OpType, int)

Parses individual lines that must start with one of: "PASS" the line is passed "DROP" the line is dropped "INJECT" the line is injected in reverse direction "INSERT" the line is injected in current direction

type LineParserFactory

type LineParserFactory struct{}

func (*LineParserFactory) Create

func (p *LineParserFactory) Create(connection *Connection) interface{}

type PasserParser

type PasserParser struct{}

func (*PasserParser) OnData

func (p *PasserParser) OnData(reply, endStream bool, data [][]byte) (OpType, int)

This simply passes all data in either direction.

type PasserParserFactory

type PasserParserFactory struct{}

func (*PasserParserFactory) Create

func (p *PasserParserFactory) Create(connection *Connection) interface{}

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