Movatterモバイル変換


[0]ホーム

URL:


cloudenv

package
v1.92.2Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2025 License:BSD-3-ClauseImports:13Imported by:9

Details

Repository

github.com/tailscale/tailscale

Links

Documentation

Overview

Package cloudenv reports which known cloud environment we're running in.

Index

Constants

View Source
const (AWS          =Cloud("aws")// Amazon Web Services (EC2 in particular)Azure        =Cloud("azure")// Microsoft AzureGCP          =Cloud("gcp")// Google CloudDigitalOcean =Cloud("digitalocean")// DigitalOcean)
View Source
const AWSResolverIP = "169.254.169.253"

AWSResolverIP is the IP address of the AWS DNS server.Seehttps://docs.aws.amazon.com/vpc/latest/userguide/vpc-dns.html

View Source
const AzureResolverIP = "168.63.129.16"

AzureResolverIP is Azure's DNS resolver IP.Seehttps://docs.microsoft.com/en-us/azure/virtual-network/what-is-ip-address-168-63-129-16

View Source
const CommonNonRoutableMetadataIP = "169.254.169.254"

CommonNonRoutableMetadataIP is the IP address of the metadata serveron Amazon EC2, Google Compute Engine, and Azure. It's not routable.(169.254.0.0/16 is a Link Local range:RFC 3927)

View Source
const GoogleMetadataAndDNSIP = "169.254.169.254"

GoogleMetadataAndDNSIP is the metadata IP used by Google Cloud.It's also the *.internal DNS server, and proxies to 8.8.8.8.

Variables

This section is empty.

Functions

This section is empty.

Types

typeCloud

type Cloudstring

Cloud is a recognize cloud environment with properties thatTailscale can specialize for in places.

funcGet

func Get()Cloud

Get returns the current cloud, or the empty string if unknown.

func (Cloud)HasInternalTLD

func (cCloud) HasInternalTLD()bool

HasInternalTLD reports whether c is a cloud environmentwhose ResolverIP serves *.internal records.

func (Cloud)ResolverIP

func (cCloud) ResolverIP()string

ResolverIP returns the cloud host's recursive DNS server or theempty string if not available.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp