reports

package
v1.17.0-beta9 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

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 HTTPRouteCondition

type HTTPRouteCondition struct {
	Type    gwv1.RouteConditionType
	Status  metav1.ConditionStatus
	Reason  gwv1.RouteConditionReason
	Message string
}

type HTTPRouteReporter

type HTTPRouteReporter interface {
	ParentRef(parentRef *gwv1.ParentReference) ParentRefReporter
}

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 ParentRefKey

type ParentRefKey struct {
	Group string
	Kind  string
	types.NamespacedName
}

type ParentRefReport

type ParentRefReport struct {
	Conditions []metav1.Condition
}

func (*ParentRefReport) SetCondition

func (prr *ParentRefReport) SetCondition(rc HTTPRouteCondition)

type ParentRefReporter

type ParentRefReporter interface {
	SetCondition(condition HTTPRouteCondition)
}

type ReportMap

type ReportMap struct {
	// contains filtered or unexported fields
}

func NewReportMap

func NewReportMap() ReportMap

func (*ReportMap) BuildGWStatus

func (r *ReportMap) BuildGWStatus(ctx context.Context, gw gwv1.Gateway) *gwv1.GatewayStatus

func (*ReportMap) BuildRouteStatus

func (r *ReportMap) BuildRouteStatus(ctx context.Context, route gwv1.HTTPRoute, cName string) *gwv1.HTTPRouteStatus

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

type Reporter

type Reporter interface {
	// returns the object reporter for the given type
	Gateway(gateway *gwv1.Gateway) GatewayReporter
	Route(route *gwv1.HTTPRoute) HTTPRouteReporter
}

func NewReporter

func NewReporter(reportMap *ReportMap) Reporter

type RouteReport

type RouteReport struct {
	// contains filtered or unexported fields
}

func (*RouteReport) ParentRef

func (r *RouteReport) ParentRef(parentRef *gwv1.ParentReference) ParentRefReporter

Jump to

Keyboard shortcuts

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