util

package
v1.300030.2 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	High_Resolution_Tag_Key      = "aws:StorageResolution"
	Aggregation_Interval_Tag_Key = "aws:AggregationInterval"
)

Variables

View Source
var Ec2MetadataInfoProvider = func() *Metadata {
	ec2 := ec2util.GetEC2UtilSingleton()
	return &Metadata{
		InstanceID: ec2.InstanceID,
		Hostname:   ec2.Hostname,
		PrivateIP:  ec2.PrivateIP,
		AccountID:  ec2.AccountID,
	}
}

Functions

func AddHighResolutionTag

func AddHighResolutionTag(tags interface{})

func Cleanup

func Cleanup(input interface{})

Filter out reserved tag keys

func GetMetadataInfo

func GetMetadataInfo(provider MetadataInfoProvider) map[string]string

func ResolvePlaceholder

func ResolvePlaceholder(placeholder string, metadata map[string]string) string

resolve place holder for log group and log stream.

Types

type Creds

type Creds struct {
	// contains filtered or unexported fields
}

func GetCredsRule

func GetCredsRule(returnTargetKey string) *Creds

func (*Creds) ApplyRule

func (c *Creds) ApplyRule(input interface{}) (returnKey string, returnVal interface{})

Grant the global creds(if exist)

type Metadata added in v1.247351.0

type Metadata struct {
	InstanceID string
	Hostname   string
	PrivateIP  string
	AccountID  string
}

type MetadataInfoProvider added in v1.247351.0

type MetadataInfoProvider func() *Metadata

type Region

type Region struct {
	// contains filtered or unexported fields
}

func GetRegionRule

func GetRegionRule(returnTargetKey string) *Region

func (*Region) ApplyRule

func (r *Region) ApplyRule(input interface{}) (returnKey string, returnVal interface{})

Grant the global creds(if exist)

Jump to

Keyboard shortcuts

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