Help us shape the future of Go! Take the 2026 Go Developer Survey

aws

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package aws drives the aws CLI with the user's profiles and SSO: CloudWatch as metrics/1 and logs/1, and resource browsers for EC2, ECS, EKS, RDS, S3 and Lambda.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CLI

func CLI(profile, region string, args ...string) *sh.Cmd

CLI is the aws command with a profile and region when set, and JSON output.

func New

func New(_ core.Env, c *spec.Component) (any, error)

func ParseTail

func ParseTail(l string) (core.LogLine, bool)

ParseTail reads a `aws logs tail --format detailed` line: time, stream, message.

func Register

func Register(p *sdk.Plugin)

Register serves the resource browsers, in plugins.aws's profile and region.

func Rows

func Rows(raw []byte) (*sdk.Frame, error)

Rows is a JSON array of flat objects as a frame, columns in first-seen order.

Types

type AWS

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

func (*AWS) Instant

func (a *AWS) Instant(ctx context.Context, query string) ([]core.Sample, error)

func (*AWS) Logs

func (a *AWS) Logs(ctx context.Context, q core.LogQuery) (<-chan core.LogLine, error)

ponytail: one aws logs tail per service; CloudWatch Logs Insights would merge them server side.

func (*AWS) Range

func (a *AWS) Range(ctx context.Context, query string, start, end time.Time, step time.Duration) ([]core.Series, error)

type MetricQuery

type MetricQuery struct {
	Namespace, Metric string
	Dimensions        []string
	Stat              string
}

MetricQuery is a CloudWatch metric as rig queries it: "AWS/EC2 CPUUtilization InstanceId=i-1 Average".

func ParseQuery

func ParseQuery(q string) (MetricQuery, error)

type Options

type Options struct {
	Profile string `yaml:"profile"`
	Region  string `yaml:"region"`
	// LogGroup is a service's log group; {service} is replaced by its name.
	LogGroup string `yaml:"log_group"`
}

Jump to

Keyboard shortcuts

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