ec2

package
v0.99.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 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(_ *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

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

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

Jump to

Keyboard shortcuts

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