18 lines
691 B
Go
18 lines
691 B
Go
|
package endpoint
|
||
|
|
||
|
import portainer "github.com/portainer/portainer/api"
|
||
|
|
||
|
// IsKubernetesEndpoint returns true if this is a kubernetes endpoint
|
||
|
func IsKubernetesEndpoint(endpoint *portainer.Endpoint) bool {
|
||
|
return endpoint.Type == portainer.KubernetesLocalEnvironment ||
|
||
|
endpoint.Type == portainer.AgentOnKubernetesEnvironment ||
|
||
|
endpoint.Type == portainer.EdgeAgentOnKubernetesEnvironment
|
||
|
}
|
||
|
|
||
|
// IsDocketEndpoint returns true if this is a docker endpoint
|
||
|
func IsDocketEndpoint(endpoint *portainer.Endpoint) bool {
|
||
|
return endpoint.Type == portainer.DockerEnvironment ||
|
||
|
endpoint.Type == portainer.AgentOnDockerEnvironment ||
|
||
|
endpoint.Type == portainer.EdgeAgentOnDockerEnvironment
|
||
|
}
|