Documentation ¶
Index ¶
- Constants
- func NewBackendResolver(logger hclog.Logger, mapper common.ConsulNamespaceMapper, ...) *backendResolver
- type BackendReference
- type BackendResolver
- type ConsulService
- type ResolutionError
- func NewBackendNotFoundError(inner string) ResolutionError
- func NewConsulResolutionError(inner string) ResolutionError
- func NewInvalidKindError(inner string) ResolutionError
- func NewK8sResolutionError(inner string) ResolutionError
- func NewRefNotPermittedError(inner string) ResolutionError
- func NewResolutionError(inner string) ResolutionError
- type ResolutionErrors
- func (r *ResolutionErrors) Add(err ResolutionError)
- func (r *ResolutionErrors) Empty() bool
- func (r *ResolutionErrors) Flatten() (ServiceResolutionErrorType, error)
- func (r ResolutionErrors) MarshalJSON() ([]byte, error)
- func (r *ResolutionErrors) String() string
- func (r *ResolutionErrors) UnmarshalJSON(b []byte) error
- type ResolvedReference
- type ResolvedReferenceType
- type RouteRule
- type RouteRuleReferenceMap
- type ServiceResolutionErrorType
Constants ¶
View Source
const ( HTTPRouteReference ResolvedReferenceType = "HTTPRoute" ConsulServiceReference ResolvedReferenceType = "ConsulService" MetaKeyKubeServiceName = "k8s-service-name" MetaKeyKubeNS = "k8s-namespace" )
Variables ¶
This section is empty.
Functions ¶
func NewBackendResolver ¶
func NewBackendResolver(logger hclog.Logger, mapper common.ConsulNamespaceMapper, client gatewayclient.Client, consul consul.Client) *backendResolver
Types ¶
type BackendReference ¶
type BackendReference struct { HTTPRef *gwv1alpha2.HTTPBackendRef BackendRef *gwv1alpha2.BackendRef }
func (*BackendReference) Set ¶
func (b *BackendReference) Set(reference interface{})
TODO: this will require a little extra work to return gwv1alpha2.BackendObjectReference for TCPRoute BackendRef and gwv1beta1.BackendObjectReference for HTTPRoute HTTPBackendRef
type BackendResolver ¶
type BackendResolver interface {
Resolve(ctx context.Context, namespace string, ref gwv1alpha2.BackendObjectReference) (*ResolvedReference, error)
}
type ConsulService ¶
type ResolutionError ¶
type ResolutionError struct {
// contains filtered or unexported fields
}
func NewBackendNotFoundError ¶ added in v0.4.0
func NewBackendNotFoundError(inner string) ResolutionError
func NewConsulResolutionError ¶
func NewConsulResolutionError(inner string) ResolutionError
func NewInvalidKindError ¶ added in v0.4.0
func NewInvalidKindError(inner string) ResolutionError
func NewK8sResolutionError ¶
func NewK8sResolutionError(inner string) ResolutionError
func NewRefNotPermittedError ¶ added in v0.2.0
func NewRefNotPermittedError(inner string) ResolutionError
func NewResolutionError ¶
func NewResolutionError(inner string) ResolutionError
func (ResolutionError) Error ¶
func (r ResolutionError) Error() string
type ResolutionErrors ¶
type ResolutionErrors struct {
// contains filtered or unexported fields
}
func NewResolutionErrors ¶
func NewResolutionErrors() *ResolutionErrors
func (*ResolutionErrors) Add ¶
func (r *ResolutionErrors) Add(err ResolutionError)
func (*ResolutionErrors) Empty ¶
func (r *ResolutionErrors) Empty() bool
func (*ResolutionErrors) Flatten ¶
func (r *ResolutionErrors) Flatten() (ServiceResolutionErrorType, error)
func (ResolutionErrors) MarshalJSON ¶ added in v0.5.0
func (r ResolutionErrors) MarshalJSON() ([]byte, error)
func (*ResolutionErrors) String ¶
func (r *ResolutionErrors) String() string
func (*ResolutionErrors) UnmarshalJSON ¶ added in v0.5.0
func (r *ResolutionErrors) UnmarshalJSON(b []byte) error
type ResolvedReference ¶
type ResolvedReference struct { Type ResolvedReferenceType Reference *BackendReference Consul *ConsulService }
func NewConsulServiceReference ¶
func NewConsulServiceReference(consul *ConsulService) *ResolvedReference
type ResolvedReferenceType ¶
type ResolvedReferenceType string
type RouteRule ¶
type RouteRule struct { HTTPRule *gwv1alpha2.HTTPRouteRule TCPRule *gwv1alpha2.TCPRouteRule }
func NewRouteRule ¶
func NewRouteRule(rule interface{}) RouteRule
type RouteRuleReferenceMap ¶
type RouteRuleReferenceMap map[RouteRule][]ResolvedReference
func (RouteRuleReferenceMap) Add ¶
func (r RouteRuleReferenceMap) Add(rule RouteRule, resolved ResolvedReference)
func (RouteRuleReferenceMap) MarshalJSON ¶ added in v0.5.0
func (r RouteRuleReferenceMap) MarshalJSON() ([]byte, error)
func (*RouteRuleReferenceMap) UnmarshalJSON ¶ added in v0.5.0
func (r *RouteRuleReferenceMap) UnmarshalJSON(b []byte) error
type ServiceResolutionErrorType ¶
type ServiceResolutionErrorType string
const ( K8sServiceResolutionErrorType ServiceResolutionErrorType = "" BackendNotFoundErrorType ServiceResolutionErrorType = "BackendNotFoundError" ConsulServiceResolutionErrorType ServiceResolutionErrorType = "ConsulServiceResolutionError" GenericResolutionErrorType ServiceResolutionErrorType = "GenericResolutionError" InvalidKindErrorType ServiceResolutionErrorType = "InvalidKindError" NoResolutionErrorType ServiceResolutionErrorType = "NoResolutionError" RefNotPermittedErrorType ServiceResolutionErrorType = "RefNotPermittedError" )
Click to show internal directories.
Click to hide internal directories.