Documentation
¶
Index ¶
- func RefreshUntil(ctx context.Context, refresh func(context.Context), ...)
- type Info
- func (m *Info) ExtractEbsIDsUsedByKubernetes() map[string]string
- func (m *Info) GetAutoScalingGroupName() string
- func (m *Info) GetClusterName() string
- func (m *Info) GetEBSVolumeID(devName string) string
- func (m *Info) GetInstanceID() string
- func (m *Info) GetInstanceIP() string
- func (m *Info) GetInstanceIPReadyC() chan bool
- func (m *Info) GetInstanceType() string
- func (m *Info) GetMemoryCapacity() int64
- func (m *Info) GetNumCores() int64
- func (m *Info) GetRegion() string
- func (m *Info) Shutdown()
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
ExtractEbsIDsUsedByKubernetes extracts the ebs volume id used by kubernetes cluster from host mount file
func (*Info) GetAutoScalingGroupName ¶ added in v0.28.0
GetAutoScalingGroupName returns the auto scaling group associated with the host
func (*Info) GetClusterName ¶ added in v0.28.0
GetClusterName returns the cluster name associated with the host
func (*Info) GetEBSVolumeID ¶ added in v0.28.0
GetEBSVolumeID returns the ebs volume id corresponding to the given device name
func (*Info) GetInstanceID ¶ added in v0.28.0
GetInstanceID returns the ec2 instance id for the host
func (*Info) GetInstanceIP ¶ added in v0.32.0
GetInstanceIP returns the IP address of the host
func (*Info) GetInstanceIPReadyC ¶ added in v0.32.0
GetInstanceIPReadyC returns the channel to show the status of host IP
func (*Info) GetInstanceType ¶ added in v0.28.0
GetInstanceType returns the ec2 instance type for the host
func (*Info) GetMemoryCapacity ¶ added in v0.28.0
GetMemoryCapacity returns the total memory (in bytes) on the host
func (*Info) GetNumCores ¶ added in v0.28.0
GetNumCores returns the number of cpu cores on the host