networkcategory

package
v0.0.0-...-5d04527 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Set

func Set(category NetworkCategory)

Set wraps atomic store action for network category indicator

Types

type NetworkCategory

type NetworkCategory string
const (
	NetworkVPC     NetworkCategory = "vpc"
	NetworkClassic NetworkCategory = "classic"
	NetworkHybrid  NetworkCategory = "hybrid"
	// In some cloud environment the metaserver(100.100.100.200) is provided,
	// and axt server domain can be retrieved from http://100.100.100.200/latest/global-config/aliyun-assist-server-url ,
	// which is slightly different with traditional resolution process in VPC
	// network. Thus a separate category indicator is here.
	// See getDomainbyMetaServer() function for more details.
	NetworkWithMetaserver NetworkCategory = "with-metaserver"

	NetworkCategoryUnknown NetworkCategory = "unknown"
)

func Get

func Get() NetworkCategory

Get returns detected category of network environment during detecting region id for determined axt server domain, otherwise NetworkCategoryUnknown

Jump to

Keyboard shortcuts

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