core

package
v1.3.30 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HeaderMatcher

type HeaderMatcher struct {
	// Specifies the name of the header in the request.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Specifies the value of the header. If the value is absent a request that
	// has the name header will match, regardless of the header’s value.
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// Specifies whether the header value should be treated as regex or not.
	Regex                bool     `protobuf:"varint,3,opt,name=regex,proto3" json:"regex,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Internally, Gloo always uses the HTTP/2 *:authority* header to represent the HTTP/1 *Host* header. Thus, if attempting to match on *Host*, match on *:authority* instead.

In the absence of any header match specifier, match will default to `present_match` i.e, a request that has the `name` header will match, regardless of the header's value.

func (*HeaderMatcher) Descriptor

func (*HeaderMatcher) Descriptor() ([]byte, []int)

func (*HeaderMatcher) Equal

func (this *HeaderMatcher) Equal(that interface{}) bool

func (*HeaderMatcher) GetName

func (m *HeaderMatcher) GetName() string

func (*HeaderMatcher) GetRegex

func (m *HeaderMatcher) GetRegex() bool

func (*HeaderMatcher) GetValue

func (m *HeaderMatcher) GetValue() string

func (*HeaderMatcher) ProtoMessage

func (*HeaderMatcher) ProtoMessage()

func (*HeaderMatcher) Reset

func (m *HeaderMatcher) Reset()

func (*HeaderMatcher) String

func (m *HeaderMatcher) String() string

func (*HeaderMatcher) XXX_DiscardUnknown

func (m *HeaderMatcher) XXX_DiscardUnknown()

func (*HeaderMatcher) XXX_Marshal

func (m *HeaderMatcher) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*HeaderMatcher) XXX_Merge

func (m *HeaderMatcher) XXX_Merge(src proto.Message)

func (*HeaderMatcher) XXX_Size

func (m *HeaderMatcher) XXX_Size() int

func (*HeaderMatcher) XXX_Unmarshal

func (m *HeaderMatcher) XXX_Unmarshal(b []byte) error

type QueryParameterMatcher

type QueryParameterMatcher struct {
	// Specifies the name of a key that must be present in the requested
	// *path*'s query string.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Specifies the value of the key. If the value is absent, a request
	// that contains the key in its query string will match, whether the
	// key appears with a value (e.g., "?debug=true") or not (e.g., "?debug")
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// Specifies whether the query parameter value is a regular expression.
	// Defaults to false. The entire query parameter value (i.e., the part to
	// the right of the equals sign in "key=value") must match the regex.
	// E.g., the regex "\d+$" will match "123" but not "a123" or "123a".
	Regex                bool     `protobuf:"varint,3,opt,name=regex,proto3" json:"regex,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Query parameter matching treats the query string of a request's :path header as an ampersand-separated list of keys and/or key=value elements.

func (*QueryParameterMatcher) Descriptor

func (*QueryParameterMatcher) Descriptor() ([]byte, []int)

func (*QueryParameterMatcher) Equal

func (this *QueryParameterMatcher) Equal(that interface{}) bool

func (*QueryParameterMatcher) GetName

func (m *QueryParameterMatcher) GetName() string

func (*QueryParameterMatcher) GetRegex

func (m *QueryParameterMatcher) GetRegex() bool

func (*QueryParameterMatcher) GetValue

func (m *QueryParameterMatcher) GetValue() string

func (*QueryParameterMatcher) ProtoMessage

func (*QueryParameterMatcher) ProtoMessage()

func (*QueryParameterMatcher) Reset

func (m *QueryParameterMatcher) Reset()

func (*QueryParameterMatcher) String

func (m *QueryParameterMatcher) String() string

func (*QueryParameterMatcher) XXX_DiscardUnknown

func (m *QueryParameterMatcher) XXX_DiscardUnknown()

func (*QueryParameterMatcher) XXX_Marshal

func (m *QueryParameterMatcher) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryParameterMatcher) XXX_Merge

func (m *QueryParameterMatcher) XXX_Merge(src proto.Message)

func (*QueryParameterMatcher) XXX_Size

func (m *QueryParameterMatcher) XXX_Size() int

func (*QueryParameterMatcher) XXX_Unmarshal

func (m *QueryParameterMatcher) XXX_Unmarshal(b []byte) error

type RouteMatcher

type RouteMatcher struct {
	// Types that are valid to be assigned to PathSpecifier:
	//	*RouteMatcher_Prefix
	//	*RouteMatcher_Exact
	//	*RouteMatcher_Regex
	PathSpecifier isRouteMatcher_PathSpecifier `protobuf_oneof:"path_specifier"`
	// Specifies a set of headers that the route should match on. The router will
	// check the request’s headers against all the specified headers in the route
	// config. A match will happen if all the headers in the route are present in
	// the request with the same values (or based on presence if the value field
	// is not in the config).
	Headers []*HeaderMatcher `protobuf:"bytes,6,rep,name=headers,proto3" json:"headers,omitempty"`
	// Specifies a set of URL query parameters on which the route should
	// match. The router will check the query string from the *path* header
	// against all the specified query parameters. If the number of specified
	// query parameters is nonzero, they all must match the *path* header's
	// query string for a match to occur.
	QueryParameters []*QueryParameterMatcher `protobuf:"bytes,7,rep,name=query_parameters,json=queryParameters,proto3" json:"query_parameters,omitempty"`
	// HTTP Method/Verb(s) to match on. If none specified, the matcher will ignore the HTTP Method
	Methods              []string `protobuf:"bytes,8,rep,name=methods,proto3" json:"methods,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Parameters for matching routes to requests received by a Gloo-managed proxy

func (*RouteMatcher) Descriptor

func (*RouteMatcher) Descriptor() ([]byte, []int)

func (*RouteMatcher) Equal

func (this *RouteMatcher) Equal(that interface{}) bool

func (*RouteMatcher) GetExact

func (m *RouteMatcher) GetExact() string

func (*RouteMatcher) GetHeaders

func (m *RouteMatcher) GetHeaders() []*HeaderMatcher

func (*RouteMatcher) GetMethods

func (m *RouteMatcher) GetMethods() []string

func (*RouteMatcher) GetPathSpecifier

func (m *RouteMatcher) GetPathSpecifier() isRouteMatcher_PathSpecifier

func (*RouteMatcher) GetPrefix

func (m *RouteMatcher) GetPrefix() string

func (*RouteMatcher) GetQueryParameters

func (m *RouteMatcher) GetQueryParameters() []*QueryParameterMatcher

func (*RouteMatcher) GetRegex

func (m *RouteMatcher) GetRegex() string

func (*RouteMatcher) ProtoMessage

func (*RouteMatcher) ProtoMessage()

func (*RouteMatcher) Reset

func (m *RouteMatcher) Reset()

func (*RouteMatcher) String

func (m *RouteMatcher) String() string

func (*RouteMatcher) XXX_DiscardUnknown

func (m *RouteMatcher) XXX_DiscardUnknown()

func (*RouteMatcher) XXX_Marshal

func (m *RouteMatcher) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RouteMatcher) XXX_Merge

func (m *RouteMatcher) XXX_Merge(src proto.Message)

func (*RouteMatcher) XXX_OneofWrappers

func (*RouteMatcher) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*RouteMatcher) XXX_Size

func (m *RouteMatcher) XXX_Size() int

func (*RouteMatcher) XXX_Unmarshal

func (m *RouteMatcher) XXX_Unmarshal(b []byte) error

type RouteMatcher_Exact

type RouteMatcher_Exact struct {
	Exact string `protobuf:"bytes,2,opt,name=exact,proto3,oneof" json:"exact,omitempty"`
}

func (*RouteMatcher_Exact) Equal

func (this *RouteMatcher_Exact) Equal(that interface{}) bool

type RouteMatcher_Prefix

type RouteMatcher_Prefix struct {
	Prefix string `protobuf:"bytes,1,opt,name=prefix,proto3,oneof" json:"prefix,omitempty"`
}

func (*RouteMatcher_Prefix) Equal

func (this *RouteMatcher_Prefix) Equal(that interface{}) bool

type RouteMatcher_Regex

type RouteMatcher_Regex struct {
	Regex string `protobuf:"bytes,3,opt,name=regex,proto3,oneof" json:"regex,omitempty"`
}

func (*RouteMatcher_Regex) Equal

func (this *RouteMatcher_Regex) Equal(that interface{}) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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