program

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2022 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = "unknown"

Functions

func NewSession

func NewSession(profile, region string, log zerolog.Logger) (*sessionInfo, error)

Types

type ClusterInfo

type ClusterInfo struct {
	*eks.Cluster
	// contains filtered or unexported fields
}

type Options

type Options struct {
	Version bool `help:"Show program version"`

	KubeConfig      string   `group:"Input" short:"k" help:"Kubeconfig file" type:"path" default:"~/.kube/config"`
	CredentialsFile string   `group:"Input" short:"c" help:"AWS Credentials File" type:"existingfile" default:"~/.aws/credentials"`
	Regions         []string `group:"Input" help:"List of regions to check" env:"AWS_REGIONS" default:"us-east-1,us-east-2,us-west-1,us-west-2"`
	Profiles        []string `group:"Input" help:"List of AWS profiles to use.  Will discover profiles if not specified" env:"AWS_PROFILES"`

	Debug        bool   `group:"Info" help:"Show debugging information"`
	OutputFormat string `group:"Info" enum:"auto,jsonl,terminal" default:"auto" help:"How to show program output (auto|terminal|jsonl)"`
	Quiet        bool   `group:"Info" help:"Be less verbose than usual"`
}

Options is the structure of program options

func (*Options) AfterApply

func (program *Options) AfterApply() error

AfterApply runs after the options are parsed but before anything runs

func (*Options) Parse

func (program *Options) Parse(args []string) (*kong.Context, error)

Parse calls the CLI parsing routines

func (*Options) ReadConfig

func (program *Options) ReadConfig() (*api.Config, error)

func (*Options) Run

func (program *Options) Run(options *Options) error

Run runs the program

func (*Options) WriteConfig

func (program *Options) WriteConfig(config *api.Config) error

type Stats

type Stats struct {
	// ProfileRegionPairs is the number of regions checked
	Profiles, UniqueProfiles, UsableProfiles, Regions, Clusters, Errors atomic.Int32
}

func (*Stats) Log

func (s *Stats) Log()

type VersionCmd

type VersionCmd struct{}

VersionCmd prints the program version

func (*VersionCmd) Run

func (v *VersionCmd) Run(program *Options) error

Jump to

Keyboard shortcuts

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