matcher

package
Version: v0.0.0-...-2c170c5 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CidrRange

func CidrRange(v string) (*corepb.CidrRange, error)

CidrRange converts a CIDR or a single IP string to a corresponding CidrRange. For a single IP string the converted CidrRange prefix is either 32 (for ipv4) or 128 (for ipv6).

func HeaderMatcher

func HeaderMatcher(k, v string) *routepb.HeaderMatcher

HeaderMatcher converts a key, value string pair to a corresponding HeaderMatcher.

func HostMatcher

func HostMatcher(k, v string) *routepb.HeaderMatcher

HostMatcher creates a host matcher for a host.

func HostMatcherWithRegex

func HostMatcherWithRegex(k, v string) *routepb.HeaderMatcher

HostMatcherWithRegex creates a host matcher for a host using regex for proxies before 1.11.

func MetadataListMatcher

func MetadataListMatcher(filter string, keys []string, value *matcherpb.StringMatcher) *matcherpb.MetadataMatcher

MetadataListMatcher creates a metadata list matcher for the given path keys and value.

func MetadataStringMatcher

func MetadataStringMatcher(filter, key string, m *matcherpb.StringMatcher) *matcherpb.MetadataMatcher

MetadataStringMatcher creates a metadata string matcher for the given filter, key and the string matcher.

func PathMatcher

func PathMatcher(path string) *matcherpb.PathMatcher

PathMatcher creates a path matcher for a path.

func StringMatcher

func StringMatcher(v string) *matcherpb.StringMatcher

StringMatcher creates a string matcher for v.

func StringMatcherRegex

func StringMatcherRegex(regex string) *matcherpb.StringMatcher

StringMatcherRegex creates a regex string matcher for regex.

func StringMatcherWithPrefix

func StringMatcherWithPrefix(v, prefix string) *matcherpb.StringMatcher

StringMatcherWithPrefix creates a string matcher for v with the extra prefix inserted to the created string matcher, note the prefix is ignored if v is wildcard ("*"). The wildcard "*" will be generated as ".+" instead of ".*".

Types

This section is empty.

Jump to

Keyboard shortcuts

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