@@ -15,7 +15,7 @@ import (
1515var nackHandlerLog = logging .New ("nack/handler" )
1616
1717type NackHandler struct {
18- nackStateStore map [* types.NamespacedName ]map [string ]string
18+ nackStateStore map [types.NamespacedName ]map [string ]string
1919 nackPublisher * Publisher
2020 mu sync.RWMutex
2121}
@@ -38,7 +38,7 @@ type AckEvent struct {
3838
3939func NewNackHandler (nackPublisher * Publisher ) * NackHandler {
4040 return & NackHandler {
41- nackStateStore : make (map [* types.NamespacedName ]map [string ]string ),
41+ nackStateStore : make (map [types.NamespacedName ]map [string ]string ),
4242 nackPublisher : nackPublisher ,
4343 mu : sync.RWMutex {},
4444 }
@@ -76,18 +76,18 @@ func (h *NackHandler) FilterEventsAndUpdateState(event *corev1.Event) error {
7676 if ! hasRecovery || recoveryOf == "" {
7777 return fmt .Errorf ("ACK event missing recovery annotation: %v" , event .Annotations )
7878 }
79- h .removeNack (& types.NamespacedName {Name : event .InvolvedObject .Name , Namespace : event .InvolvedObject .Namespace }, recoveryOf )
79+ h .removeNack (types.NamespacedName {Name : event .InvolvedObject .Name , Namespace : event .InvolvedObject .Namespace }, recoveryOf )
8080 return nil
8181 }
82- h .addNack (& types.NamespacedName {Name : event .InvolvedObject .Name , Namespace : event .InvolvedObject .Namespace }, nackID , event .Message )
82+ h .addNack (types.NamespacedName {Name : event .InvolvedObject .Name , Namespace : event .InvolvedObject .Namespace }, nackID , event .Message )
8383 return nil
8484}
8585
8686// ComputeStatus computes the Gateway status condition based on the current set of active NACKs for a gateway.
8787// - No active NACKs: No status returned
8888// - One active NACK: Programmed=False with specific error message
8989// - Multiple active NACKs: Programmed=False with aggregated error count
90- func (h * NackHandler ) ComputeStatus (gateway * types.NamespacedName ) * metav1.Condition {
90+ func (h * NackHandler ) ComputeStatus (gateway types.NamespacedName ) * metav1.Condition {
9191 h .mu .RLock ()
9292 defer h .mu .RUnlock ()
9393 activeNacks := h .nackStateStore [gateway ]
@@ -116,7 +116,7 @@ func (h *NackHandler) ComputeStatus(gateway *types.NamespacedName) *metav1.Condi
116116}
117117
118118// addNack adds a NACK to the Gateway's active NACK set when a NACK event is received via the Kubernetes Event API.
119- func (h * NackHandler ) addNack (gateway * types.NamespacedName , nackID , message string ) {
119+ func (h * NackHandler ) addNack (gateway types.NamespacedName , nackID , message string ) {
120120 h .mu .Lock ()
121121 defer h .mu .Unlock ()
122122 if h .nackStateStore [gateway ] == nil {
@@ -126,7 +126,7 @@ func (h *NackHandler) addNack(gateway *types.NamespacedName, nackID, message str
126126}
127127
128128// removeNack removes a NACK from the Gateway's active set when an ACK event is received via the Kubernetes Event API.
129- func (h * NackHandler ) removeNack (gateway * types.NamespacedName , nackID string ) {
129+ func (h * NackHandler ) removeNack (gateway types.NamespacedName , nackID string ) {
130130 h .mu .Lock ()
131131 defer h .mu .Unlock ()
132132 if h .nackStateStore [gateway ] == nil {
0 commit comments