ec2

package
v0.0.6-beta Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEC2Client

func NewEC2Client(region string, roleArn string) (*ec2.Client, error)

func QueryInstanceMetadata

func QueryInstanceMetadata(ctx context.Context, c *ec2.Client, instanceIds []string) (*types.Instance, error)

Types

type EC2Client

type EC2Client struct {
	Service EC2ClientIface
}

type EC2ClientIface

type EC2ClientIface interface {
	DescribeInstances(ctx context.Context, params *ec2.DescribeInstancesInput, optFns ...func(*ec2.Options)) (*ec2.DescribeInstancesOutput, error)
}

Jump to

Keyboard shortcuts

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