cloud

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2020 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Probe

type Probe struct {
	Name     string          `json:"name"`
	Detected bool            `json:"detected"`
	Results  map[string]bool `json:"results"`
	// contains filtered or unexported fields
}

Probe struct for clouds. Used to store the results of the probe and the name of the cloud discovered.

func New

func New() (*Probe, error)

New initializes new probe struct and probes the system.

func (*Probe) AWS

func (p *Probe) AWS() bool

AWS detects if a system is on Amazon Web Services (AWS). Baremetal and Nitro (KVM) based instances will have "Amazon EC2" as the sys_vendor. The older Xen based systems (e.g t2) will show Xen. To further identify these systems the Hypervisor UUID will start with "ec2".

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/identify_ec2_instances.html

func (*Probe) Alibaba

func (p *Probe) Alibaba() bool

Alibaba detects if a system is on the Alibaba Cloud.

func (*Probe) Azure

func (p *Probe) Azure() bool

Azure detects if a system is on Microsoft Azure. The value assigned to the chassis_asset_tag in sys is hard-coded on Azure and is used to ID the platform.

https://bugs.launchpad.net/cloud-init/+bug/1693939

func (*Probe) CloudSigma

func (p *Probe) CloudSigma() bool

CloudSigma detects if a system is on CloudSigma.

func (*Probe) CloudStack

func (p *Probe) CloudStack() bool

CloudStack detects if a system is on Apache CloudStack.

func (*Probe) DigitalOcean

func (p *Probe) DigitalOcean() bool

DigitalOcean detects if a system is on DigitalOcean.

func (*Probe) Exoscale

func (p *Probe) Exoscale() bool

Exoscale detects if a system is on the Apache Exoscale.

func (*Probe) GCP

func (p *Probe) GCP() bool

GCP detects if a system is on Google Compute Platform.

Source: https://github.com/googleapis/google-cloud-go/blob/master/compute/metadata/metadata.go#L188

func (*Probe) Hetzner

func (p *Probe) Hetzner() bool

Hetzner detects if a system is on the Hetzner Cloud.

func (*Probe) JSON

func (p *Probe) JSON() string

JSON representation of the struct.

func (*Probe) OpenStack

func (p *Probe) OpenStack() bool

OpenStack detects if a system is on OpenStack.

func (*Probe) Oracle

func (p *Probe) Oracle() bool

Oracle detects if a system is on Oracle Cloud.

func (*Probe) SmartOS

func (p *Probe) SmartOS() bool

SmartOS detects if a system is on SmartOS.

func (*Probe) String

func (p *Probe) String() string

String representation of the struct.

Jump to

Keyboard shortcuts

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