hostinfo

package
v0.0.0-...-ded95ce Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: BSD-3-Clause Imports: 20 Imported by: 0

Documentation

Overview

Package hostinfo answers questions about the host environment that Tailscale is running on.

Index

Constants

View Source
const (
	KNative         = EnvType("kn")
	AWSLambda       = EnvType("lm")
	Heroku          = EnvType("hr")
	AzureAppService = EnvType("az")
	AWSFargate      = EnvType("fg")
	FlyDotIo        = EnvType("fly")
	Kubernetes      = EnvType("k8s")
	DockerDesktop   = EnvType("dde")
)

Variables

This section is empty.

Functions

func DisabledEtcAptSource

func DisabledEtcAptSource() bool

DisabledEtcAptSource reports whether Ubuntu (or similar) has disabled the /etc/apt/sources.list.d/tailscale.list file contents upon upgrade to a new release of the distro.

See https://github.com/tailscale/tailscale/issues/3177

func GetOSVersion

func GetOSVersion() string

GetOSVersion returns the OSVersion of current host if available.

func New

func New() *tailcfg.Hostinfo

New returns a partially populated Hostinfo for the current host.

func SetDeviceModel

func SetDeviceModel(model string)

SetDeviceModel sets the device model for use in Hostinfo updates.

func SetOSVersion

func SetOSVersion(v string)

SetOSVersion sets the OS version.

func SetPackage

func SetPackage(v string)

SetPackage sets the packaging type for the app.

As of 2022-03-25, this is used by Android ("nogoogle" for the F-Droid build) and tsnet (set to "tsnet").

Types

type EnvType

type EnvType string

EnvType represents a known environment type. The empty string, the default, means unknown.

func GetEnvType

func GetEnvType() EnvType

Jump to

Keyboard shortcuts

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