Documentation ¶
Index ¶
- Constants
- func NewProviderFromViper(v *viper.Viper, logger logrus.FieldLogger, _ string) (gostatsd.CloudProvider, error)
- type Provider
- func (p *Provider) EstimatedTags() int
- func (p *Provider) Instance(ctx context.Context, IP ...gostatsd.Source) (map[gostatsd.Source]*gostatsd.Instance, error)
- func (p *Provider) MaxInstancesBatch() int
- func (p *Provider) Name() string
- func (p *Provider) RunMetrics(ctx context.Context, statser stats.Statser)
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 (*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 ¶
MaxInstancesBatch returns maximum number of instances that could be requested via the Instance method.
Click to show internal directories.
Click to hide internal directories.