mirror of
				https://github.com/traefik/traefik.git
				synced 2025-11-04 02:11:15 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			12 lines
		
	
	
		
			306 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
		
			306 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package k8s
 | 
						|
 | 
						|
import (
 | 
						|
	v1 "k8s.io/api/discovery/v1"
 | 
						|
	"k8s.io/utils/ptr"
 | 
						|
)
 | 
						|
 | 
						|
// EndpointServing returns true if the endpoint is still serving the service.
 | 
						|
func EndpointServing(endpoint v1.Endpoint) bool {
 | 
						|
	return ptr.Deref(endpoint.Conditions.Ready, false) || ptr.Deref(endpoint.Conditions.Serving, false)
 | 
						|
}
 |