utils

package
v0.0.0-...-a5e26f1 Latest Latest
Warning

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

Go to latest
Published: May 7, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	InstanceOwner string = createInstanceOwnerTag()
)

Functions

func GetCurrentUser

func GetCurrentUser() string

func GetInstanceIp

func GetInstanceIp(region string) (string, error)

GetInstanceIp returns the public IP address of the ec2 instance

func GetInstanceStatus

func GetInstanceStatus(region string) (string, error)

GetInstanceStatus returns the reachability status of the ec2 instance

func GetPrivateSSHKey

func GetPrivateSSHKey() []byte

GetPrivateSSHKey returns the private ssh key at ~/.ssh/id_rsa

func GetPublicSSHKey

func GetPublicSSHKey() []byte

GetPublicSSHKey returns the public ssh key at ~/.ssh/id_rsa.pub

func LocalIP

func LocalIP() []byte

LocalIP returns the IP address of the machine that executed the program

func SetupEC2Client

func SetupEC2Client(region string) *ec2.EC2

SetupEC2Client configures a client to make EC2 API calls

Types

This section is empty.

Jump to

Keyboard shortcuts

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