Skip to content

Commit

Permalink
Improve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
romulets committed Mar 14, 2024
1 parent 0ca9855 commit a289194
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
24 changes: 20 additions & 4 deletions internal/inventory/asset.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,37 @@ import (
"fmt"
)

// assetCategory is used to build the document index. Use only numbers, letters and dashes (-)
type assetCategory string
type assetSubCategory string
type assetType string
type assetSubType string
type assetCloudProvider string

const (
CategoryInfrastructure assetCategory = "infrastructure"
)

// assetSubCategory is used to build the document index. Use only numbers, letters and dashes (-)
type assetSubCategory string

const (
SubCategoryCompute assetSubCategory = "compute"
)

// assetType is used to build the document index. Use only numbers, letters and dashes (-)
type assetType string

const (
TypeVirtualMachine assetType = "virtual-machine"
)

// assetSubType is used to build the document index. Use only numbers, letters and dashes (-)
type assetSubType string

const (
SubTypeEC2 assetSubType = "ec2"
)

type assetCloudProvider string

const (
AwsCloudProvider assetCloudProvider = "aws"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/inventory/aws/fetcher_ec2.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func newEc2Fetcher(logger *logp.Logger, identity *cloud.Identity, cfg aws.Config
func (e *Ec2Fetcher) Fetch(ctx context.Context, assetChannel chan<- inventory.AssetEvent) {
instances, err := e.provider.DescribeInstances(ctx)
if err != nil {
e.logger.Errorf("Could not list ec2 instances (%v)", err)
e.logger.Errorf("Could not list ec2 instances: %v", err)
return
}

Expand Down

0 comments on commit a289194

Please sign in to comment.