aws

package
v0.0.0-...-170def7 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2018 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ProviderName is the name of AWS cloud provider.
	ProviderName = "aws"
)

Variables

This section is empty.

Functions

func NewProviderFromViper

func NewProviderFromViper(v *viper.Viper, logger logrus.FieldLogger) (gostatsd.CloudProvider, error)

NewProviderFromViper returns a new aws provider.

Types

type Provider

type Provider struct {
	Metadata     *ec2metadata.EC2Metadata
	Ec2          *ec2.EC2
	MaxInstances int
	// contains filtered or unexported fields
}

Provider represents an AWS provider.

func (*Provider) EstimatedTags

func (p *Provider) EstimatedTags() int

func (*Provider) Instance

func (p *Provider) Instance(ctx context.Context, IP ...gostatsd.IP) (map[gostatsd.IP]*gostatsd.Instance, error)

Instance returns instances details from AWS. ip -> nil pointer if instance was not found. map is returned even in case of errors because it may contain partial data.

func (*Provider) MaxInstancesBatch

func (p *Provider) MaxInstancesBatch() int

MaxInstancesBatch returns maximum number of instances that could be requested via the Instance method.

func (*Provider) Name

func (p *Provider) Name() string

Name returns the name of the provider.

func (*Provider) RunMetrics

func (p *Provider) RunMetrics(ctx context.Context, statser stats.Statser)

func (*Provider) SelfIP

func (p *Provider) SelfIP() (gostatsd.IP, error)

SelfIP returns host's IPv4 address.

Jump to

Keyboard shortcuts

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