Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for InvertStatus (0.14 sec)

  1. pilot/pkg/model/kstatus/helper.go

    	"istio.io/istio/pkg/config"
    	"istio.io/istio/pkg/slices"
    )
    
    const (
    	StatusTrue  = "True"
    	StatusFalse = "False"
    )
    
    // InvertStatus returns the opposite of the provided status. If an invalid status is passed in, False is returned
    func InvertStatus(status metav1.ConditionStatus) metav1.ConditionStatus {
    	switch status {
    	case StatusFalse:
    		return StatusTrue
    	default:
    		return StatusFalse
    	}
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 24 17:36:41 UTC 2023
    - 3.7K bytes
    - Viewed (0)
  2. pilot/pkg/model/kstatus/helper_test.go

    			status: metav1.ConditionUnknown,
    			want:   metav1.ConditionFalse,
    		},
    	}
    	for _, tt := range tests {
    		t.Run(tt.name, func(t *testing.T) {
    			if got := InvertStatus(tt.status); !reflect.DeepEqual(got, tt.want) {
    				t.Errorf("InvertStatus got %v, want %v", got, tt.want)
    			}
    		})
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 24 18:11:40 UTC 2023
    - 9K bytes
    - Viewed (0)
  3. pilot/pkg/config/kube/gateway/conditions.go

    		// for more information
    		if cond.error != nil {
    			existingConditions = setter(existingConditions, metav1.Condition{
    				Type:               k,
    				Status:             kstatus.InvertStatus(cond.status),
    				ObservedGeneration: generation,
    				LastTransitionTime: metav1.Now(),
    				Reason:             cond.error.Reason,
    				Message:            cond.error.Message,
    			})
    		} else {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 17 13:05:41 UTC 2024
    - 14.4K bytes
    - Viewed (0)
Back to top