cloud

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2019 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package cloud provides information about the host cloud platform.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Host

type Host int

Host is the computing resource that is running the code.

const (
	GenericHost Host = iota
	VM
	Container
	Function
)

Valid host types.

func (Host) String

func (h Host) String() string

String implements fmt.Stringer.

type Info

type Info struct {
	Type   Type
	Host   Host
	HostID string
}

Info describes the host platform. All fields are populated on a best-effort basis.

func Ident

func Ident() Info

Ident attempts to identify the cloud platform where the code is running.

type Type

type Type int

Type is the general cloud type (e.g. AWS, Azure).

const (
	Unknown Type = iota
	AWS
	Azure
)

Valid cloud types.

func (Type) String

func (t Type) String() string

String implements fmt.Stringer.

Jump to

Keyboard shortcuts

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