host

package
v0.121.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RefreshUntil added in v0.31.0

func RefreshUntil(ctx context.Context, refresh func(context.Context), refreshInterval time.Duration,
	shouldRefresh func() bool, maxJitterTime time.Duration,
)

execute the refresh() function periodically with the given refresh interval until shouldRefresh() return false or the context is canceled

Types

type Info added in v0.28.0

type Info struct {
	// contains filtered or unexported fields
}

Info contains information about a host

func NewInfo added in v0.28.0

func NewInfo(containerOrchestrator string, refreshInterval time.Duration, logger *zap.Logger, options ...machineInfoOption) (*Info, error)

NewInfo creates a new Info struct

func (*Info) ExtractEbsIDsUsedByKubernetes added in v0.30.0

func (m *Info) ExtractEbsIDsUsedByKubernetes() map[string]string

ExtractEbsIDsUsedByKubernetes extracts the ebs volume id used by kubernetes cluster from host mount file

func (*Info) GetAutoScalingGroupName added in v0.28.0

func (m *Info) GetAutoScalingGroupName() string

GetAutoScalingGroupName returns the auto scaling group associated with the host

func (*Info) GetClusterName added in v0.28.0

func (m *Info) GetClusterName() string

GetClusterName returns the cluster name associated with the host

func (*Info) GetEBSVolumeID added in v0.28.0

func (m *Info) GetEBSVolumeID(devName string) string

GetEBSVolumeID returns the ebs volume id corresponding to the given device name

func (*Info) GetInstanceID added in v0.28.0

func (m *Info) GetInstanceID() string

GetInstanceID returns the ec2 instance id for the host

func (*Info) GetInstanceIP added in v0.32.0

func (m *Info) GetInstanceIP() string

GetInstanceIP returns the IP address of the host

func (*Info) GetInstanceIPReadyC added in v0.32.0

func (m *Info) GetInstanceIPReadyC() chan bool

GetInstanceIPReadyC returns the channel to show the status of host IP

func (*Info) GetInstanceType added in v0.28.0

func (m *Info) GetInstanceType() string

GetInstanceType returns the ec2 instance type for the host

func (*Info) GetMemoryCapacity added in v0.28.0

func (m *Info) GetMemoryCapacity() int64

GetMemoryCapacity returns the total memory (in bytes) on the host

func (*Info) GetNumCores added in v0.28.0

func (m *Info) GetNumCores() int64

GetNumCores returns the number of cpu cores on the host

func (*Info) GetRegion added in v0.28.0

func (m *Info) GetRegion() string

GetRegion returns the region for the host

func (*Info) Shutdown added in v0.28.0

func (m *Info) Shutdown()

Shutdown stops the host Info

Jump to

Keyboard shortcuts

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