match

package
v0.0.0-...-9db8963 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DestinationPort = &xds.TypedExtensionConfig{
		Name:        "port",
		TypedConfig: protoconv.MessageToAny(&network.DestinationPortInput{}),
	}
	DestinationIP = &xds.TypedExtensionConfig{
		Name:        "ip",
		TypedConfig: protoconv.MessageToAny(&network.DestinationIPInput{}),
	}
	SourceIP = &xds.TypedExtensionConfig{
		Name:        "source-ip",
		TypedConfig: protoconv.MessageToAny(&network.SourceIPInput{}),
	}
	SNI = &xds.TypedExtensionConfig{
		Name:        "sni",
		TypedConfig: protoconv.MessageToAny(&network.ServerNameInput{}),
	}
	ApplicationProtocolInput = &xds.TypedExtensionConfig{
		Name:        "application-protocol",
		TypedConfig: protoconv.MessageToAny(&network.ApplicationProtocolInput{}),
	}
	TransportProtocolInput = &xds.TypedExtensionConfig{
		Name:        "transport-protocol",
		TypedConfig: protoconv.MessageToAny(&network.TransportProtocolInput{}),
	}
)

Functions

func NewAppProtocol

func NewAppProtocol(pm ProtocolMatch) *matcher.Matcher

func ToChain

func ToChain(name string) *matcher.Matcher_OnMatch

func ToMatcher

func ToMatcher(match *matcher.Matcher) *matcher.Matcher_OnMatch

Types

type Mapper

type Mapper struct {
	*matcher.Matcher
	Map map[string]*matcher.Matcher_OnMatch
}

func NewDestinationIP

func NewDestinationIP() Mapper

func NewDestinationPort

func NewDestinationPort() Mapper

func NewSourceIP

func NewSourceIP() Mapper

func (Mapper) BuildMatcher

func (m Mapper) BuildMatcher() *matcher.Matcher

BuildMatcher cleans the entire match tree to avoid empty maps and returns a viable top-level matcher. Note: this mutates the internal mappers/matchers that make up the tree.

type ProtocolMatch

type ProtocolMatch struct {
	TCP, HTTP *matcher.Matcher_OnMatch
}

Jump to

Keyboard shortcuts

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