ec2

package
v0.72.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package ec2 contains the AWS EC2 hostname provider

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HostInfo

type HostInfo struct {
	InstanceID  string
	EC2Hostname string
	EC2Tags     []string
}

func GetHostInfo

func GetHostInfo(logger *zap.Logger) (hostInfo *HostInfo)

GetHostInfo gets the hostname info from EC2 metadata

func (*HostInfo) GetHostname

func (hi *HostInfo) GetHostname(logger *zap.Logger) string

type Provider

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

func NewProvider

func NewProvider(logger *zap.Logger) (*Provider, error)

func (*Provider) ClusterName added in v0.54.0

func (p *Provider) ClusterName(ctx context.Context) (string, error)

ClusterName gets the cluster name from an AWS EC2 machine.

func (*Provider) HostInfo

func (p *Provider) HostInfo() *HostInfo

func (*Provider) Source added in v0.54.0

func (p *Provider) Source(ctx context.Context) (source.Source, error)

Jump to

Keyboard shortcuts

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