util

package
v0.0.0-...-5e3b14e Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2019 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttachAWSCredentials

func AttachAWSCredentials(cfg *aws.Config, profile *AWSProfile) error

func CreateVaultRenewer

func CreateVaultRenewer(client *vault.Client, secret *vault.Secret) (*vault.Renewer, error)

Used for dynamic credentials

func FetchVaultClient

func FetchVaultClient(vaultAddress string) (*vault.Client, *vault.Secret, error)

func GetQueueURL

func GetQueueURL(cp client.ConfigProvider, queueName string, awsRegion string, profile *AWSProfile) string

func KubernetesClientset

func KubernetesClientset(kubeconfig string) *kubernetes.Clientset

Types

type ASGMessage

type ASGMessage struct {
	LifecycleHookName    *string
	AccountId            *string
	RequestId            *string
	LifecycleTransition  *string
	AutoScalingGroupName *string
	Service              *string
	Time                 *string
	EC2InstanceId        *string
	LifecycleActionToken *string
}

type AWSProfile

type AWSProfile struct {
	Profile         string
	AccessKeyID     string
	SecretAccessKey string
	EC2RoleProvider bool
	SessionToken    string
}

func FetchAWSCredentials

func FetchAWSCredentials(client *vault.Client) (AWSProfile, error)

Used for static credentials

func GenerateAWSCredentials

func GenerateAWSCredentials(client *vault.Client) (AWSProfile, int, error)

Used for dynamic credentials

func (*AWSProfile) BuildSession

func (c *AWSProfile) BuildSession(region string) *session.Session

func (*AWSProfile) IsValid

func (c *AWSProfile) IsValid() bool

func (*AWSProfile) Shared

func (c *AWSProfile) Shared() bool

func (*AWSProfile) Static

func (c *AWSProfile) Static() bool

type SpotMessage

type SpotMessage struct {
	Version    *string
	Id         *string
	DetailType *string `json:"detail-type"`
	Source     *string
	Time       *string
	Region     *string
	Resources  []*string
	Detail     struct {
		InstanceId     *string `json:"instance-id"`
		InstanceAction *string `json:"instance-action"`
	} `json:"detail"`
}

Jump to

Keyboard shortcuts

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