platform

package
v0.0.0-...-270f78c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2023 License: Zlib Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PodmanMode            = "PODMAN"
	KubernetesServiceHost = "KUBERNETES_SERVICE_HOST"
	NomadJobName          = "NOMAD_JOB_NAME"
)
View Source
const (
	// PlatformDockerStandalone represent the Docker platform (Standalone)
	PlatformDockerStandalone = ContainerPlatform("Docker Standalone")
	// PlatformDockerSwarm represent the Docker platform (Swarm)
	PlatformDockerSwarm = ContainerPlatform("Docker Swarm")
	// PlatformKubernetes represent the Kubernetes platform
	PlatformKubernetes = ContainerPlatform("Kubernetes")
	// PlatformPodman represent the Podman platform (Standalone)
	PlatformPodman = ContainerPlatform("Podman")
	// PlatformNomad represent the Nomad platform (Standalone)
	PlatformNomad = ContainerPlatform("Nomad")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerPlatform

type ContainerPlatform string

ContainerPlatform represent the platform on which the container is running (Docker, Kubernetes, Nomad)

func DetermineContainerPlatform

func DetermineContainerPlatform() (ContainerPlatform, error)

DetermineContainerPlatform will check for the existence of the PODMAN_MODE or KUBERNETES_SERVICE_HOST environment variable to determine if the container is running on Podman or inside the Kubernetes platform. Defaults to Docker otherwise.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL