Documentation
¶
Index ¶
- Constants
- Variables
- func MarshalJSONForAPI(v any, query *gojq.Query) ([]byte, error)
- func RunCLI(ctx context.Context, args []string) error
- func UnmarshalJSONForStruct(src []byte, v any) error
- type CLI
- type Config
- type ConfigElement
- type ConfigureOption
- type CpOption
- type DescribeOption
- type Ecsta
- func (app *Ecsta) Dispatch(ctx context.Context, command string, cli *CLI) error
- func (app *Ecsta) Endpoint(ctx context.Context) (string, error)
- func (app *Ecsta) RunConfigure(ctx context.Context, cmd *ConfigureOption) error
- func (app *Ecsta) RunCp(ctx context.Context, opt *CpOption) error
- func (app *Ecsta) RunDescribe(ctx context.Context, opt *DescribeOption) error
- func (app *Ecsta) RunExec(ctx context.Context, opt *ExecOption) error
- func (app *Ecsta) RunList(ctx context.Context, opt *ListOption) error
- func (app *Ecsta) RunLogs(ctx context.Context, opt *LogsOption) error
- func (app *Ecsta) RunPortforward(ctx context.Context, opt *PortforwardOption) error
- func (app *Ecsta) RunStop(ctx context.Context, opt *StopOption) error
- func (app *Ecsta) RunTrace(ctx context.Context, opt *TraceOption) error
- func (app *Ecsta) SetCluster(ctx context.Context) error
- type ExecOption
- type ListOption
- type LogsOption
- type PortforwardOption
- type StopOption
- type TraceOption
Constants ¶
View Source
const SessionManagerPluginBinary = "session-manager-plugin"
Variables ¶
View Source
var ErrAborted = errors.New("Aborted")
View Source
var Version string
Functions ¶
func MarshalJSONForAPI ¶ added in v0.0.4
func UnmarshalJSONForStruct ¶ added in v0.0.4
Types ¶
type CLI ¶ added in v0.0.6
type CLI struct {
Cluster string `help:"ECS cluster name" short:"c" env:"ECS_CLUSTER"`
Region string `help:"AWS region" short:"r" env:"AWS_REGION"`
Output string `help:"output format (table, tsv, json)" short:"o" default:"table" enum:"table,tsv,json" env:"ECSTA_OUTPUT"`
TaskFormatQuery string `help:"A jq query to format task in selector" short:"q" env:"ECSTA_TASK_FORMAT_QUERY"`
Debug bool `help:"enable debug output" env:"ECSTA_DEBUG"`
LogFormat string `help:"log format (text, json)" short:"l" default:"text" enum:"text,json" env:"ECSTA_LOG_FORMAT"`
Configure *ConfigureOption `cmd:"" help:"Create a configuration file of ecsta"`
Describe *DescribeOption `cmd:"" help:"Describe tasks"`
Exec *ExecOption `cmd:"" help:"Execute a command on a task"`
List *ListOption `cmd:"" help:"List tasks"`
Logs *LogsOption `cmd:"" help:"Show log messages of a task"`
Portforward *PortforwardOption `cmd:"" help:"Forward a port of a task"`
Stop *StopOption `cmd:"" help:"Stop a task"`
Trace *TraceOption `cmd:"" help:"Trace a task"`
CP *CpOption `cmd:"" help:"Copy files from/to a task"`
Version struct{} `cmd:"" help:"Show version"`
}
type Config ¶
type Config struct {
FilterCommand string `help:"command to run to filter messages" json:"filter_command"`
Output string `help:"output format (table, tsv or json)" enum:"table,tsv,json" default:"table" json:"output"`
TaskFormatQuery string `help:"A jq query to format task in selector" json:"task_format_query"`
}
func (*Config) ConfigElements ¶ added in v0.3.2
func (c *Config) ConfigElements() []ConfigElement
func (*Config) OverrideCLI ¶ added in v0.0.3
type ConfigElement ¶
type ConfigureOption ¶ added in v0.0.3
type ConfigureOption struct {
Show bool `help:"show current configuration" short:"s"`
}
type CpOption ¶ added in v0.6.0
type CpOption struct {
Src string `arg:"" help:"Source"`
Dest string `arg:"" help:"Destination"`
Port int `help:"port number for file transfer" default:"12345"`
Progress bool `help:"show progress bar" negatable:"" default:"true"`
ID string `help:"task ID"`
Container string `help:"container name"`
Family *string `help:"task definition family name"`
Service *string `help:"ECS service name"`
}
func (*CpOption) DestTarget ¶ added in v0.6.0
type DescribeOption ¶ added in v0.0.3
type Ecsta ¶
type Ecsta struct {
Config *Config
// contains filtered or unexported fields
}
func (*Ecsta) RunConfigure ¶ added in v0.0.3
func (app *Ecsta) RunConfigure(ctx context.Context, cmd *ConfigureOption) error
func (*Ecsta) RunDescribe ¶ added in v0.0.3
func (app *Ecsta) RunDescribe(ctx context.Context, opt *DescribeOption) error
func (*Ecsta) RunExec ¶ added in v0.0.3
func (app *Ecsta) RunExec(ctx context.Context, opt *ExecOption) error
func (*Ecsta) RunList ¶ added in v0.0.3
func (app *Ecsta) RunList(ctx context.Context, opt *ListOption) error
func (*Ecsta) RunLogs ¶ added in v0.0.4
func (app *Ecsta) RunLogs(ctx context.Context, opt *LogsOption) error
func (*Ecsta) RunPortforward ¶ added in v0.0.3
func (app *Ecsta) RunPortforward(ctx context.Context, opt *PortforwardOption) error
func (*Ecsta) RunStop ¶ added in v0.0.3
func (app *Ecsta) RunStop(ctx context.Context, opt *StopOption) error
type ExecOption ¶ added in v0.0.3
type ListOption ¶ added in v0.0.3
type LogsOption ¶ added in v0.0.4
type LogsOption struct {
ID string `help:"task ID"`
StartTime string `help:"a start time of logs" short:"s"`
Duration time.Duration `help:"log timestamps duration" short:"d" default:"1m"`
Follow bool `help:"follow logs" short:"f"`
Container string `help:"container name"`
Family *string `help:"task definition family name"`
Service *string `help:"ECS service name"`
JSON bool `help:"output as JSON lines" short:"j"`
}
func (*LogsOption) ResolveTimestamps ¶ added in v0.2.1
type PortforwardOption ¶ added in v0.0.3
type PortforwardOption struct {
ID string `help:"task ID"`
Container string `help:"container name"`
LocalPort int `help:"local port"`
RemotePort int `help:"remote port"`
RemoteHost string `help:"remote host"`
L string `name:"L" help:"short expression of local-port:remote-host:remote-port" short:"L"`
Family *string `help:"task definition family name"`
Service *string `help:"ECS service name"`
Public bool `help:"bind to all interfaces (0.0.0.0) instead of localhost only"`
// contains filtered or unexported fields
}
func (*PortforwardOption) ParseL ¶ added in v0.4.4
func (opt *PortforwardOption) ParseL() error
type StopOption ¶ added in v0.0.3
type TraceOption ¶ added in v0.0.3
type TraceOption struct {
ID string `help:"task ID"`
Duration time.Duration `help:"duration to trace" short:"d" default:"1m"`
SNSTopicArn string `help:"SNS topic ARN"`
Family *string `help:"task definition family name"`
Service *string `help:"ECS service name"`
JSON bool `help:"output JSON lines" short:"j"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.