Documentation
¶
Index ¶
- type GatewayCondition
- type GatewayReport
- type GatewayReporter
- type ListenerCondition
- type ListenerReport
- type ListenerReporter
- type ListenerSetReport
- type ListenerSetReporter
- type ParentRefKey
- type ParentRefReport
- type ParentRefReporter
- type ReportMap
- func (r *ReportMap) BuildGWStatus(ctx context.Context, gw gwv1.Gateway) *gwv1.GatewayStatus
- func (r *ReportMap) BuildListenerSetStatus(ctx context.Context, ls gwxv1a1.XListenerSet) *gwxv1a1.ListenerSetStatus
- func (r *ReportMap) BuildRouteStatus(ctx context.Context, obj client.Object, cName string) *gwv1.RouteStatus
- func (r *ReportMap) Gateway(gateway *gwv1.Gateway) *GatewayReport
- func (r *ReportMap) ListenerSet(listenerSet *gwxv1alpha1.XListenerSet) *ListenerSetReport
- type Reporter
- type RouteCondition
- type RouteReport
- type RouteReporter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GatewayCondition ¶
type GatewayCondition struct {
Type gwv1.GatewayConditionType
Status metav1.ConditionStatus
Reason gwv1.GatewayConditionReason
Message string
}
type GatewayReport ¶
type GatewayReport struct {
// contains filtered or unexported fields
}
func (*GatewayReport) GetConditions ¶
func (g *GatewayReport) GetConditions() []metav1.Condition
func (*GatewayReport) Listener ¶
func (g *GatewayReport) Listener(listener *gwv1.Listener) ListenerReporter
func (*GatewayReport) SetCondition ¶
func (g *GatewayReport) SetCondition(gc GatewayCondition)
type GatewayReporter ¶
type GatewayReporter interface {
Listener(listener *gwv1.Listener) ListenerReporter
SetCondition(condition GatewayCondition)
}
type ListenerCondition ¶
type ListenerCondition struct {
Type gwv1.ListenerConditionType
Status metav1.ConditionStatus
Reason gwv1.ListenerConditionReason
Message string
}
type ListenerReport ¶
type ListenerReport struct {
Status gwv1.ListenerStatus
}
func NewListenerReport ¶
func NewListenerReport(name string) *ListenerReport
func (*ListenerReport) SetAttachedRoutes ¶
func (l *ListenerReport) SetAttachedRoutes(n uint)
func (*ListenerReport) SetCondition ¶
func (l *ListenerReport) SetCondition(lc ListenerCondition)
func (*ListenerReport) SetSupportedKinds ¶
func (l *ListenerReport) SetSupportedKinds(rgks []gwv1.RouteGroupKind)
type ListenerReporter ¶
type ListenerReporter interface {
SetCondition(ListenerCondition)
SetSupportedKinds([]gwv1.RouteGroupKind)
SetAttachedRoutes(n uint)
}
type ListenerSetReport ¶ added in v1.19.0
type ListenerSetReport struct {
// contains filtered or unexported fields
}
func (*ListenerSetReport) GetConditions ¶ added in v1.19.0
func (g *ListenerSetReport) GetConditions() []metav1.Condition
func (*ListenerSetReport) Listener ¶ added in v1.19.0
func (g *ListenerSetReport) Listener(listener *gwv1.Listener) ListenerReporter
func (*ListenerSetReport) SetCondition ¶ added in v1.19.0
func (g *ListenerSetReport) SetCondition(gc GatewayCondition)
type ListenerSetReporter ¶ added in v1.19.0
type ListenerSetReporter interface {
Listener(listener *gwv1.Listener) ListenerReporter
SetCondition(condition GatewayCondition)
}
type ParentRefKey ¶
type ParentRefKey struct {
Group string
Kind string
types.NamespacedName
}
type ParentRefReport ¶
TODO: rename to e.g. RouteParentRefReport
func (*ParentRefReport) SetCondition ¶
func (prr *ParentRefReport) SetCondition(rc RouteCondition)
type ParentRefReporter ¶
type ParentRefReporter interface {
SetCondition(condition RouteCondition)
}
type ReportMap ¶
type ReportMap struct {
Gateways map[types.NamespacedName]*GatewayReport
ListenerSets map[types.NamespacedName]*ListenerSetReport
HTTPRoutes map[types.NamespacedName]*RouteReport
TCPRoutes map[types.NamespacedName]*RouteReport
TLSRoutes map[types.NamespacedName]*RouteReport
}
func NewReportMap ¶
func NewReportMap() ReportMap
func (*ReportMap) BuildGWStatus ¶
func (*ReportMap) BuildListenerSetStatus ¶ added in v1.19.0
func (r *ReportMap) BuildListenerSetStatus(ctx context.Context, ls gwxv1a1.XListenerSet) *gwxv1a1.ListenerSetStatus
func (*ReportMap) BuildRouteStatus ¶
func (r *ReportMap) BuildRouteStatus(ctx context.Context, obj client.Object, cName string) *gwv1.RouteStatus
BuildRouteStatus returns a newly constructed and fully defined RouteStatus for the supplied route object according to the state of the ReportMap. If the ReportMap does not have a RouteReport for the given route, e.g. because it did not encounter the route during translation, or the object is an unsupported route kind, nil is returned. Supported object types are:
* HTTPRoute * TCPRoute
func (*ReportMap) Gateway ¶
func (r *ReportMap) Gateway(gateway *gwv1.Gateway) *GatewayReport
Returns a GatewayReport for the provided Gateway, nil if there is not a report present. This is different than the Reporter.Gateway() method, as we need to understand when reports are not generated for a Gateway that has been translated.
NOTE: Exported for unit testing, validation_test.go should be refactored to reduce this visibility
func (*ReportMap) ListenerSet ¶ added in v1.19.0
func (r *ReportMap) ListenerSet(listenerSet *gwxv1alpha1.XListenerSet) *ListenerSetReport
Returns a ListenerSetReport for the provided ListenerSet, nil if there is not a report present. This is different than the Reporter.ListenerSet() method, as we need to understand when reports are not generated for a ListenerSet that has been translated.
NOTE: Exported for unit testing, validation_test.go should be refactored to reduce this visibility
type Reporter ¶
type Reporter interface {
Gateway(gateway *gwv1.Gateway) GatewayReporter
ListenerSet(listenerSet *gwxv1alpha1.XListenerSet) ListenerSetReporter
Route(obj client.Object) RouteReporter
}
func NewReporter ¶
type RouteCondition ¶ added in v1.18.0
type RouteCondition struct {
Type gwv1.RouteConditionType
Status metav1.ConditionStatus
Reason gwv1.RouteConditionReason
Message string
}
type RouteReport ¶
type RouteReport struct {
Parents map[ParentRefKey]*ParentRefReport
// contains filtered or unexported fields
}
func (*RouteReport) ParentRef ¶
func (r *RouteReport) ParentRef(parentRef *gwv1.ParentReference) ParentRefReporter
type RouteReporter ¶ added in v1.18.0
type RouteReporter interface {
ParentRef(parentRef *gwv1.ParentReference) ParentRefReporter
}