ecstoolkit

package module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2025 License: Apache-2.0 Imports: 0 Imported by: 0

README

ecstoolkit

Go Reference CI

This is a hard fork of the AWS session-manager-plugin as of v1.2.707.0. The primary audience is people shaped like platform engineers who want to integrate connecting to ECS in their own Go tooling, such as an in-house CLI.

It represents a significant rewrite and modernization of the original library. The main goals were to make it easy to integrate, improve code quality, remove technical debt, and address concurrency and maintainability issues.

Changes Since Upstream

  • Removed packaging tooling and AWS CLI plugin capabalities.
  • Removed vendored code.
  • Removed Windows support and its dependencies (I have no Windows systems to test on).
  • Removed deprecated and unusued code.
  • Replaced unmaintained UUID library with google/uuid.
  • Replaced logging with log/slog.
  • Upgraded to AWS SDK for Go v2.
  • Removed global state and init() functions.
  • Fixed data races and added mutexes/atomic where required.
  • Fixed most golangci-lint errors.
  • Removed direct printing to stdout and use of os.Exit().
  • Refactored and simplified how sessions are established.

Usage

See usage_test.go for examples.

Contributing

I'm very happy to accept changes that would improve ecstoolskit's usefulness as a library. If someone wants to maintain Windows support that would be great too.

License

Apache License. Original source copyright 2018 Amazon.com, Inc. or its affiliates.

I've pulled some changes from unmerged pull requests, which hopefully preserved the original authors when cherry-picking.

There is no vendored code in this fork. Third party dependencies are as shown in go.mod.

Documentation

Overview

Package ecstoolkit provides tools for integrating AWS ECS session management and related functionality into Go applications. It is a modernized fork of the AWS session-manager-plugin, designed for platform engineers and CLI tool authors.

See README.md for major changes and usage examples.

Directories

Path Synopsis
Package cluster provides functionality for managing AWS ECS clusters, including service management, task definitions, and container operations.
Package cluster provides functionality for managing AWS ECS clusters, including service management, task definitions, and container operations.
Package communicator implements a base communicator for network connections.
Package communicator implements a base communicator for network connections.
Package config provides configuration constants for the application.
Package config provides configuration constants for the application.
Package datachannel implements data channel for interactive sessions.
Package datachannel implements data channel for interactive sessions.
Package encryption provides encryption and decryption functionality using AWS KMS.
Package encryption provides encryption and decryption functionality using AWS KMS.
mocks
Package mocks provides a mock implementation of the IEncryptorBuilder interface for testing purposes.
Package mocks provides a mock implementation of the IEncryptorBuilder interface for testing purposes.
Package executor implements ECS task execution and session management.
Package executor implements ECS task execution and session management.
Package jsonutil contains various utilities for dealing with json data.
Package jsonutil contains various utilities for dealing with json data.
Package log is used to initialize the logger.
Package log is used to initialize the logger.
Package message defines data channel messages structure.
Package message defines data channel messages structure.
Package retry implements back off retry strategy for reconnect web socket connection.
Package retry implements back off retry strategy for reconnect web socket connection.
Package service is a wrapper for the new Service
Package service is a wrapper for the new Service
Package session starts the session.
Package session starts the session.
portsession
Package portsession starts port session.
Package portsession starts port session.
sessionutil
Package sessionutil contains utility methods required to start session.
Package sessionutil contains utility methods required to start session.
shellsession
Package shellsession starts shell session.
Package shellsession starts shell session.
Package util provides utility functions.
Package util provides utility functions.
Package version contains CLI version constant and utilities.
Package version contains CLI version constant and utilities.
Package websocketutil contains methods for interacting with websocket connections.
Package websocketutil contains methods for interacting with websocket connections.

Jump to

Keyboard shortcuts

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