Documentation
¶
Overview ¶
Package runtime 提供一些可以在运行环境中一定程度上唯一标识在一个集群中一台机器、一个进程的信息
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AllStatic ¶
type AllStatic struct {
Host Host `json:"host"`
Kubernetes Kubernetes `json:"kubernetes"`
Docker Docker `json:"docker"`
Networks []NIC `json:"networks"`
Process Process `json:"process"`
}
AllStatic 表示可以获取的全部运行时静态信息
type Docker ¶
type Docker struct {
// 是否可能在 Docker 容器中
MayInDocker bool `json:"may_in_docker"`
// 凭什么判断可能在 Docker 容器中
WhyInDocker string `json:"why_in_docker,omitempty"`
}
Docker docker container 特殊信息
type Host ¶
type Host struct {
OS string `json:"os"`
Arch string `json:"arch"`
Hostname string `json:"hostname"`
Username string `json:"username"`
HomeDir string `json:"home_dir"`
}
Host 操作系统信息
type Kubernetes ¶
type Kubernetes struct {
ServiceHost string `json:"service_host,omitempty"` // KUBERNETES_SERVICE_HOST
ServicePort int `json:"service_port,omitempty"` // KUBERNETES_SERVICE_PORT
MayInK8s bool `json:"may_in_k8s"` // 是否可能在 K8s pod 中
WhyInK8s string `json:"why_in_k8s,omitempty"` // 凭什么判断可能在 K8s pod 中
}
Kubernetes K8s pod 特殊信息
Directories
¶
| Path | Synopsis |
|---|---|
|
Package caller provides packaging for system runtime.Caller
|
Package caller provides packaging for system runtime.Caller |
|
Package env 提供一些环境变量相关的工具
|
Package env 提供一些环境变量相关的工具 |
Click to show internal directories.
Click to hide internal directories.