Documentation ¶
Index ¶
- func MarshalResolvedRoute(route ResolvedRoute) ([]byte, error)
- type CommonRoute
- type GatewayID
- type HTTPFilter
- type HTTPFilterType
- type HTTPHeaderFilter
- type HTTPHeaderMatch
- type HTTPHeaderMatchType
- type HTTPMatch
- type HTTPMethod
- type HTTPPathMatch
- type HTTPPathMatchType
- type HTTPQueryMatch
- type HTTPQueryMatchType
- type HTTPRedirectFilter
- type HTTPRoute
- type HTTPRouteBuilder
- func (b *HTTPRouteBuilder) Build() ResolvedRoute
- func (b *HTTPRouteBuilder) WithHostnames(hostnames []string) *HTTPRouteBuilder
- func (b *HTTPRouteBuilder) WithMeta(meta map[string]string) *HTTPRouteBuilder
- func (b *HTTPRouteBuilder) WithName(name string) *HTTPRouteBuilder
- func (b *HTTPRouteBuilder) WithNamespace(namespace string) *HTTPRouteBuilder
- func (b *HTTPRouteBuilder) WithRules(rules []HTTPRouteRule) *HTTPRouteBuilder
- type HTTPRouteRule
- type HTTPService
- type HTTPURLRewriteFilter
- type ResolvedGateway
- type ResolvedListener
- type ResolvedRoute
- type ResolvedRouteType
- type ResolvedService
- type SyncAdapter
- type TCPRoute
- type TCPRouteBuilder
- func (b *TCPRouteBuilder) Build() ResolvedRoute
- func (b *TCPRouteBuilder) WithMeta(meta map[string]string) *TCPRouteBuilder
- func (b *TCPRouteBuilder) WithName(name string) *TCPRouteBuilder
- func (b *TCPRouteBuilder) WithNamespace(namespace string) *TCPRouteBuilder
- func (b *TCPRouteBuilder) WithService(service ResolvedService) *TCPRouteBuilder
- type TLSParams
- type URLRewriteType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalResolvedRoute ¶ added in v0.5.0
func MarshalResolvedRoute(route ResolvedRoute) ([]byte, error)
MarshalResolvedRoute takes a ResolvedRoute implementation, serializes it, and then wraps it in a resolvedRouteWrapper so that we can determine which type of xRoute to return on deserialization.
Types ¶
type CommonRoute ¶
func (CommonRoute) GetMeta ¶
func (c CommonRoute) GetMeta() map[string]string
func (CommonRoute) GetName ¶
func (c CommonRoute) GetName() string
func (CommonRoute) GetNamespace ¶
func (c CommonRoute) GetNamespace() string
type HTTPFilter ¶
type HTTPFilter struct { Type HTTPFilterType Header HTTPHeaderFilter Redirect HTTPRedirectFilter URLRewrite HTTPURLRewriteFilter }
type HTTPFilterType ¶
type HTTPFilterType string
const ( HTTPHeaderFilterType HTTPFilterType = "HTTPHeaderFilter" HTTPRedirectFilterType HTTPFilterType = "HTTPRedirectFilter" HTTPURLRewriteFilterType HTTPFilterType = "HTTPURLRewriteFilter" )
type HTTPHeaderFilter ¶
type HTTPHeaderMatch ¶
type HTTPHeaderMatch struct { Type HTTPHeaderMatchType Name string Value string }
type HTTPHeaderMatchType ¶
type HTTPHeaderMatchType string
const ( HTTPHeaderMatchNoneType HTTPHeaderMatchType = "" HTTPHeaderMatchExactType HTTPHeaderMatchType = "HTTPHeaderMatchExact" HTTPHeaderMatchPrefixType HTTPHeaderMatchType = "HTTPHeaderMatchPrefix" HTTPHeaderMatchSuffixType HTTPHeaderMatchType = "HTTPHeaderMatchSuffix" HTTPHeaderMatchPresentType HTTPHeaderMatchType = "HTTPHeaderMatchPresent" HTTPHeaderMatchRegularExpressionType HTTPHeaderMatchType = "HTTPHeaderMatchRegularExpression" )
type HTTPMatch ¶
type HTTPMatch struct { Path HTTPPathMatch Headers []HTTPHeaderMatch Query []HTTPQueryMatch Method HTTPMethod }
type HTTPMethod ¶
type HTTPMethod string
const ( HTTPMethodNone HTTPMethod = "" HTTPMethodConnect HTTPMethod = "CONNECT" HTTPMethodDelete HTTPMethod = "DELETE" HTTPMethodGet HTTPMethod = "GET" HTTPMethodHead HTTPMethod = "HEAD" HTTPMethodOptions HTTPMethod = "OPTIONS" HTTPMethodPatch HTTPMethod = "PATCH" HTTPMethodPost HTTPMethod = "POST" HTTPMethodPut HTTPMethod = "PUT" HTTPMethodTrace HTTPMethod = "TRACE" )
type HTTPPathMatch ¶
type HTTPPathMatch struct { Type HTTPPathMatchType Value string }
type HTTPPathMatchType ¶
type HTTPPathMatchType string
const ( HTTPPathMatchNoneType HTTPPathMatchType = "" HTTPPathMatchExactType HTTPPathMatchType = "HTTPPathMatchExact" HTTPPathMatchPrefixType HTTPPathMatchType = "HTTPPathMatchPrefix" HTTPPathMatchRegularExpressionType HTTPPathMatchType = "HTTPPathMatchRegularExpression" )
type HTTPQueryMatch ¶
type HTTPQueryMatch struct { Type HTTPQueryMatchType Name string Value string }
type HTTPQueryMatchType ¶
type HTTPQueryMatchType string
const ( HTTPQueryMatchNoneType HTTPQueryMatchType = "" HTTPQueryMatchExactType HTTPQueryMatchType = "HTTPQueryMatchExact" HTTPQueryMatchPresentType HTTPQueryMatchType = "HTTPQueryMatchPresent" HTTPQueryMatchRegularExpressionType HTTPQueryMatchType = "HTTPQueryMatchRegularExpression" )
type HTTPRedirectFilter ¶
type HTTPRoute ¶
type HTTPRoute struct { CommonRoute Hostnames []string Rules []HTTPRouteRule }
func (HTTPRoute) GetType ¶
func (r HTTPRoute) GetType() ResolvedRouteType
type HTTPRouteBuilder ¶
type HTTPRouteBuilder struct {
// contains filtered or unexported fields
}
func NewHTTPRouteBuilder ¶
func NewHTTPRouteBuilder() *HTTPRouteBuilder
func (*HTTPRouteBuilder) Build ¶
func (b *HTTPRouteBuilder) Build() ResolvedRoute
func (*HTTPRouteBuilder) WithHostnames ¶
func (b *HTTPRouteBuilder) WithHostnames(hostnames []string) *HTTPRouteBuilder
func (*HTTPRouteBuilder) WithMeta ¶
func (b *HTTPRouteBuilder) WithMeta(meta map[string]string) *HTTPRouteBuilder
func (*HTTPRouteBuilder) WithName ¶
func (b *HTTPRouteBuilder) WithName(name string) *HTTPRouteBuilder
func (*HTTPRouteBuilder) WithNamespace ¶
func (b *HTTPRouteBuilder) WithNamespace(namespace string) *HTTPRouteBuilder
func (*HTTPRouteBuilder) WithRules ¶
func (b *HTTPRouteBuilder) WithRules(rules []HTTPRouteRule) *HTTPRouteBuilder
type HTTPRouteRule ¶
type HTTPRouteRule struct { Matches []HTTPMatch Filters []HTTPFilter Services []HTTPService }
type HTTPService ¶
type HTTPService struct { Service ResolvedService Weight int32 Filters []HTTPFilter }
type HTTPURLRewriteFilter ¶ added in v0.4.0
type HTTPURLRewriteFilter struct { Type URLRewriteType ReplacePrefixMatch string }
type ResolvedGateway ¶
type ResolvedGateway struct { ID GatewayID Meta map[string]string Listeners []ResolvedListener MaxConnections *uint32 }
type ResolvedListener ¶
type ResolvedRoute ¶
type ResolvedRoute interface { GetType() ResolvedRouteType GetMeta() map[string]string GetName() string GetNamespace() string }
func UnmarshalResolvedRoute ¶ added in v0.5.0
func UnmarshalResolvedRoute(b []byte) (ResolvedRoute, error)
UnmarshalResolvedRoute takes a serialized resolvedRouteWrapper and deserializes it into the appropriate ResolvedRoute implementation. It first partially deserializes to the wrapper in order to get the type and then deserializes the Data field into the target HTTPRoute or TCPRoute.
type ResolvedRouteType ¶
type ResolvedRouteType string
const ( ResolvedHTTPRouteType ResolvedRouteType = "HTTPRoute" ResolvedTCPRouteType ResolvedRouteType = "TCPRoute" )
type ResolvedService ¶
type SyncAdapter ¶
type SyncAdapter interface { Sync(ctx context.Context, gateway ResolvedGateway) (bool, error) Clear(ctx context.Context, id GatewayID) error }
SyncAdapter is used for synchronizing store state to an external system
type TCPRoute ¶
type TCPRoute struct { CommonRoute Service ResolvedService }
func (TCPRoute) GetType ¶
func (r TCPRoute) GetType() ResolvedRouteType
type TCPRouteBuilder ¶
type TCPRouteBuilder struct {
// contains filtered or unexported fields
}
func NewTCPRouteBuilder ¶
func NewTCPRouteBuilder() *TCPRouteBuilder
func (*TCPRouteBuilder) Build ¶
func (b *TCPRouteBuilder) Build() ResolvedRoute
func (*TCPRouteBuilder) WithMeta ¶
func (b *TCPRouteBuilder) WithMeta(meta map[string]string) *TCPRouteBuilder
func (*TCPRouteBuilder) WithName ¶
func (b *TCPRouteBuilder) WithName(name string) *TCPRouteBuilder
func (*TCPRouteBuilder) WithNamespace ¶
func (b *TCPRouteBuilder) WithNamespace(namespace string) *TCPRouteBuilder
func (*TCPRouteBuilder) WithService ¶
func (b *TCPRouteBuilder) WithService(service ResolvedService) *TCPRouteBuilder
type URLRewriteType ¶ added in v0.4.0
type URLRewriteType string
const (
URLRewriteReplacePrefixMatchType URLRewriteType = "URLRewriteReplacePrefixMatch"
)
Click to show internal directories.
Click to hide internal directories.