resources

package
v0.0.0-...-5d55901 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AwsElasticacheRedisNode     ResourceType = "AWS::Elasticache::RedisNode"
	AwsElasticacheMemcachedNode ResourceType = "AWS::Elasticache::MemcachedNode"
	AwsDynamoDbTable                         = "AWS::DynamoDB::Table"
	AwsDynamoDbGsi                           = "AWS::DynamoDB::GSI"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DynamoDb

type DynamoDb struct {
	Client *dynamodb.Client
}

func (*DynamoDb) GetAll

func (ddb *DynamoDb) GetAll() ([]*ResourceSummary, error)

func (*DynamoDb) GetMetricTargets

func (ddb *DynamoDb) GetMetricTargets(r *ResourceSummary) ResourceMetricTargets

type Elasticache

type Elasticache struct {
	Client *elasticache.Client
}

func (*Elasticache) GetAll

func (ec *Elasticache) GetAll() ([]*ResourceSummary, error)

func (*Elasticache) GetMetricTargets

func (ec *Elasticache) GetMetricTargets(r *ResourceSummary) ResourceMetricTargets

type MetricBlob

type MetricBlob struct {
	Name   string    `json:"name"`
	Values []float64 `json:"values"`
}

type Resource

type Resource interface {
	GetAll() ([]*ResourceSummary, error)
	GetMetricTargets(r *ResourceSummary) ResourceMetricTargets
}

type ResourceMetricTargets

type ResourceMetricTargets struct {
	Namespace  string
	Dimensions []types.Dimension
	Targets    map[string][]string
}

type ResourceSummary

type ResourceSummary struct {
	ID             string            `json:"id"`
	Type           ResourceType      `json:"type"`
	AdditionalData map[string]string `json:"additional_data"`
	Metrics        []MetricBlob      `json:"metrics"`
	Resource       Resource
}

type ResourceType

type ResourceType string

Jump to

Keyboard shortcuts

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