aws

package
v0.0.0-...-7a0dfb2 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2020 License: MIT Imports: 19 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, _ string) (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.Source) (map[gostatsd.Source]*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)

Jump to

Keyboard shortcuts

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