platform

package
v0.0.0-...-b2113b7 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOldWinlogChannels

func GetOldWinlogChannels() ([]string, error)

Types

type Platform

type Platform struct {
	Type               Type
	WindowsBuildNumber string
	WinlogV1Channels   []string
	HostInfo           *host.InfoStat
	HasNvidiaGpu       bool
	ResourceOverride   resourcedetector.Resource
	// Resource override only for GCE metadata unit testing
	TestGCEResourceOverride resourcedetector.Resource
}

func FromContext

func FromContext(ctx context.Context) Platform

func (Platform) GetResource

func (p Platform) GetResource() (resourcedetector.Resource, error)

func (Platform) Hostname

func (p Platform) Hostname() string

func (Platform) Is2012

func (p Platform) Is2012() bool

func (Platform) Is2016

func (p Platform) Is2016() bool

func (Platform) Name

func (p Platform) Name() string

func (Platform) TestContext

func (p Platform) TestContext(ctx context.Context) context.Context

func (Platform) UserAgent

func (p Platform) UserAgent(prefix string) (string, error)

func (Platform) VersionLabel

func (p Platform) VersionLabel(prefix string) (string, error)

type Type

type Type int
const (
	Linux Type = 1 << iota
	Windows
	All = Linux | Windows
)

Jump to

Keyboard shortcuts

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