Documentation ¶
Index ¶
- Constants
- func Error2ConditionMsg(err error) string
- func MergeConditions(conditions []metav1.Condition, updates ...metav1.Condition) []metav1.Condition
- func SetGatewayClassAccepted(gc *gwapiv1.GatewayClass, accepted bool, reason, msg string) *gwapiv1.GatewayClass
- func UpdateGatewayStatusAcceptedCondition(gw *gwapiv1.Gateway, accepted bool) *gwapiv1.Gateway
- func UpdateGatewayStatusProgrammedCondition(gw *gwapiv1.Gateway, svc *corev1.Service, deployment *appsv1.Deployment, ...)
- type Update
- type UpdateHandler
Constants ¶
const ( ReasonOlderGatewayClassExists gwapiv1.GatewayClassConditionReason = "OlderGatewayClassExists" MsgOlderGatewayClassExists = "Invalid GatewayClass: another older GatewayClass with the same Spec.Controller exists" MsgValidGatewayClass = "Valid GatewayClass" MsgGatewayClassInvalidParams = "Invalid parametersRef" )
Variables ¶
This section is empty.
Functions ¶
func Error2ConditionMsg ¶
Error2ConditionMsg format the error string to a Status condition message. * Convert the first letter to capital * Append "." to the string if it doesn't exit
func MergeConditions ¶
MergeConditions adds or updates matching conditions, and updates the transition time if details of a condition have changed. Returns the updated condition array.
func SetGatewayClassAccepted ¶
func SetGatewayClassAccepted(gc *gwapiv1.GatewayClass, accepted bool, reason, msg string) *gwapiv1.GatewayClass
SetGatewayClassAccepted inserts or updates the Accepted condition for the provided GatewayClass.
func UpdateGatewayStatusAcceptedCondition ¶
UpdateGatewayStatusAcceptedCondition updates the status condition for the provided Gateway based on the accepted state.
func UpdateGatewayStatusProgrammedCondition ¶
func UpdateGatewayStatusProgrammedCondition(gw *gwapiv1.Gateway, svc *corev1.Service, deployment *appsv1.Deployment, nodeAddresses ...string)
UpdateGatewayStatusProgrammedCondition updates the status addresses for the provided gateway based on the status IP/Hostname of svc and updates the Programmed condition based on the service and deployment state.
Types ¶
type Update ¶
type Update struct { NamespacedName types.NamespacedName Resource client.Object UpdateStatus func(client.Object) client.Object }
Update contain status update event information
type UpdateHandler ¶
type UpdateHandler struct {
// contains filtered or unexported fields
}
UpdateHandler handles status updates
func NewUpdateHandler ¶
func NewUpdateHandler(client client.Client) *UpdateHandler
NewUpdateHandler get a new status update handler
func (*UpdateHandler) Send ¶
func (updateHandler *UpdateHandler) Send(update Update)
Send public method to add status update events to the update channel.