cmd

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InitCmd = &cobra.Command{
	Use:   "init",
	Short: "Creates a blank `ecsrun.yml` config file in the current directory.",
	Run: func(cmd *cobra.Command, args []string) {

		viper.Reset()

		initCmd()
	},
}

InitCmd is responsible for creating a `ecsrun.yml`

Functions

func Execute

func Execute(n func(*RunConfig) ECSClient, v VersionInfo)

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Types

type ECSClient

type ECSClient interface {
	BuildRunTaskInput() *ecs.RunTaskInput
	RunTask(runTaskInput *ecs.RunTaskInput) (*ecs.RunTaskOutput, error)
}

ECSClient is the wrapper around the aws-sdk ECS client and its various structs / methods.

func NewEcsClient

func NewEcsClient(config *RunConfig) ECSClient

NewEcsClient creates a new ecsClient for the given RunConfig

type RunConfig

type RunConfig struct {
	Command                []*string
	Cluster                string
	TaskDefinition         string
	TaskDefinitionName     string
	TaskDefinitionRevision string
	ContainerName          string
	LaunchType             string
	Count                  int64

	SubnetID           string
	SecurityGroupID    string
	AssignPublicIPFlag bool
	AssignPublicIP     string

	Session *session.Session
}

RunConfig is the main config object used to configure the RunTask.

func BuildRunConfig

func BuildRunConfig() *RunConfig

BuildRunConfig constructs the our primary RunConfig object using the given AWS session and the CLI args from viper.

type VersionInfo

type VersionInfo struct {
	Version string
	Commit  string
	Date    string
	BuiltBy string
}

VersionInfo is used by the `--version` command to output version info.

func (VersionInfo) String

func (v VersionInfo) String() string

Jump to

Keyboard shortcuts

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