system

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container struct {
	// ID of the container.
	ID string
	// Kubernetes metadata.
	Kubernetes *Kubernetes
}

Container metadata.

type Info

type Info struct {
	Hostname  string
	Container *Container
}

func CollectInfo

func CollectInfo() *Info

Info collects system information.

func (Info) IsContainer

func (i Info) IsContainer() bool

func (Info) IsKubernetes

func (i Info) IsKubernetes() bool

type Kubernetes

type Kubernetes struct {
	// Namespace is the namespace of the pod.
	Namespace string
	// PodName is the name of the pod.
	PodName string
	// PodUID is the unique identifier of the pod.
	PodUID string
	// NodeName is the name of the node.
	NodeName string
}

Kubernetes represents information about the kubernetes environment.

Jump to

Keyboard shortcuts

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