├── VERSION ├── .dockerignore ├── agent ├── vendor │ ├── golang.org │ │ └── x │ │ │ ├── sys │ │ │ ├── unix │ │ │ │ ├── .gitignore │ │ │ │ ├── constants.go │ │ │ │ ├── syscall_no_getwd.go │ │ │ │ ├── zsysnum_solaris_amd64.go │ │ │ │ ├── syscall_linux_amd64_gc.go │ │ │ │ ├── env_unset.go │ │ │ │ ├── flock_linux_32bit.go │ │ │ │ ├── asm_solaris_amd64.s │ │ │ │ ├── gccgo_linux_sparc64.go │ │ │ │ ├── gccgo_linux_amd64.go │ │ │ │ ├── race0.go │ │ │ │ ├── env_unix.go │ │ │ │ ├── syscall_unix_gc.go │ │ │ │ ├── asm_linux_arm64.s │ │ │ │ ├── str.go │ │ │ │ ├── race.go │ │ │ │ ├── asm_linux_s390x.s │ │ │ │ ├── asm_linux_ppc64x.s │ │ │ │ ├── asm_linux_arm.s │ │ │ │ ├── asm_linux_mips64x.s │ │ │ │ ├── asm_netbsd_arm.s │ │ │ │ ├── asm_freebsd_arm.s │ │ │ │ ├── asm_darwin_386.s │ │ │ │ ├── asm_netbsd_386.s │ │ │ │ ├── asm_darwin_amd64.s │ │ │ │ ├── asm_freebsd_386.s │ │ │ │ ├── asm_linux_amd64.s │ │ │ │ ├── asm_netbsd_amd64.s │ │ │ │ ├── asm_openbsd_386.s │ │ │ │ ├── asm_dragonfly_amd64.s │ │ │ │ ├── asm_freebsd_amd64.s │ │ │ │ ├── asm_openbsd_amd64.s │ │ │ │ ├── asm_darwin_arm.s │ │ │ │ ├── asm_darwin_arm64.s │ │ │ │ ├── bluetooth_linux.go │ │ │ │ ├── asm_linux_mipsx.s │ │ │ │ └── flock.go │ │ │ ├── AUTHORS │ │ │ ├── CONTRIBUTORS │ │ │ └── windows │ │ │ │ ├── registry │ │ │ │ └── mksyscall.go │ │ │ │ ├── mksyscall.go │ │ │ │ ├── env_unset.go │ │ │ │ ├── asm_windows_386.s │ │ │ │ ├── asm_windows_amd64.s │ │ │ │ ├── race0.go │ │ │ │ ├── ztypes_windows_386.go │ │ │ │ ├── ztypes_windows_amd64.go │ │ │ │ ├── str.go │ │ │ │ ├── env_windows.go │ │ │ │ └── race.go │ │ │ ├── net │ │ │ ├── AUTHORS │ │ │ └── CONTRIBUTORS │ │ │ └── tools │ │ │ ├── AUTHORS │ │ │ ├── CONTRIBUTORS │ │ │ ├── go │ │ │ └── ast │ │ │ │ └── astutil │ │ │ │ └── util.go │ │ │ └── imports │ │ │ ├── fastwalk_dirent_ino.go │ │ │ └── fastwalk_dirent_fileno.go │ └── github.com │ │ ├── Microsoft │ │ └── go-winio │ │ │ ├── .gitignore │ │ │ └── syscall.go │ │ ├── Sirupsen │ │ └── logrus │ │ │ ├── .gitignore │ │ │ ├── terminal_appengine.go │ │ │ ├── .travis.yml │ │ │ ├── terminal_bsd.go │ │ │ ├── terminal_solaris.go │ │ │ ├── terminal_linux.go │ │ │ ├── doc.go │ │ │ ├── terminal_notwindows.go │ │ │ └── terminal_windows.go │ │ ├── docker │ │ ├── docker │ │ │ ├── project │ │ │ │ └── CONTRIBUTORS.md │ │ │ ├── pkg │ │ │ │ ├── archive │ │ │ │ │ ├── README.md │ │ │ │ │ ├── archive_other.go │ │ │ │ │ ├── copy_windows.go │ │ │ │ │ ├── copy_unix.go │ │ │ │ │ ├── time_unsupported.go │ │ │ │ │ ├── time_linux.go │ │ │ │ │ └── changes_windows.go │ │ │ │ ├── fileutils │ │ │ │ │ ├── fileutils_windows.go │ │ │ │ │ ├── fileutils_solaris.go │ │ │ │ │ ├── fileutils_unix.go │ │ │ │ │ └── fileutils_darwin.go │ │ │ │ ├── system │ │ │ │ │ ├── errors.go │ │ │ │ │ ├── meminfo_unsupported.go │ │ │ │ │ ├── umask_windows.go │ │ │ │ │ ├── utimes_unsupported.go │ │ │ │ │ ├── umask.go │ │ │ │ │ ├── chtimes_unix.go │ │ │ │ │ ├── mknod_windows.go │ │ │ │ │ ├── stat_openbsd.go │ │ │ │ │ ├── xattrs_unsupported.go │ │ │ │ │ ├── lstat.go │ │ │ │ │ ├── stat_unsupported.go │ │ │ │ │ ├── meminfo.go │ │ │ │ │ ├── filesys.go │ │ │ │ │ ├── syscall_unix.go │ │ │ │ │ ├── path_unix.go │ │ │ │ │ ├── lstat_windows.go │ │ │ │ │ ├── utimes_freebsd.go │ │ │ │ │ ├── stat_freebsd.go │ │ │ │ │ ├── chtimes_windows.go │ │ │ │ │ └── utimes_linux.go │ │ │ │ ├── ioutils │ │ │ │ │ ├── temp_unix.go │ │ │ │ │ ├── temp_windows.go │ │ │ │ │ └── fmt.go │ │ │ │ ├── promise │ │ │ │ │ └── promise.go │ │ │ │ ├── idtools │ │ │ │ │ ├── usergroupadd_unsupported.go │ │ │ │ │ └── idtools_windows.go │ │ │ │ └── term │ │ │ │ │ ├── tc_other.go │ │ │ │ │ └── term_unix.go │ │ │ ├── opts │ │ │ │ ├── hosts_windows.go │ │ │ │ ├── opts_unix.go │ │ │ │ └── hosts_unix.go │ │ │ ├── api │ │ │ │ └── types │ │ │ │ │ └── swarm │ │ │ │ │ └── common.go │ │ │ └── NOTICE │ │ └── go-units │ │ │ ├── circle.yml │ │ │ └── README.md │ │ ├── pborman │ │ └── uuid │ │ │ ├── CONTRIBUTORS │ │ │ ├── doc.go │ │ │ └── json.go │ │ ├── fsouza │ │ └── go-dockerclient │ │ │ ├── .gitignore │ │ │ ├── DOCKER-LICENSE │ │ │ ├── appveyor.yml │ │ │ ├── .travis.yml │ │ │ └── Makefile │ │ ├── jmespath │ │ └── go-jmespath │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── README.md │ │ │ ├── api.go │ │ │ ├── LICENSE │ │ │ └── toktype_string.go │ │ ├── deniswernert │ │ └── udev │ │ │ ├── README.md │ │ │ ├── .gitignore │ │ │ └── modalias.go │ │ ├── go-ini │ │ └── ini │ │ │ └── .gitignore │ │ ├── aws │ │ └── aws-sdk-go │ │ │ ├── service │ │ │ ├── ec2 │ │ │ │ └── errors.go │ │ │ └── sts │ │ │ │ └── customizations.go │ │ │ ├── NOTICE.txt │ │ │ ├── aws │ │ │ ├── context_1_7.go │ │ │ ├── signer │ │ │ │ └── v4 │ │ │ │ │ ├── options.go │ │ │ │ │ └── uri_path.go │ │ │ ├── request │ │ │ │ ├── request_1_8.go │ │ │ │ ├── connection_reset_error_appengine.go │ │ │ │ ├── connection_reset_error.go │ │ │ │ ├── request_context_1_6.go │ │ │ │ ├── http_request.go │ │ │ │ ├── request_context.go │ │ │ │ └── request_1_7.go │ │ │ ├── version.go │ │ │ ├── credentials │ │ │ │ └── example.ini │ │ │ ├── url.go │ │ │ ├── client │ │ │ │ └── metadata │ │ │ │ │ └── client_info.go │ │ │ ├── jsonvalue.go │ │ │ ├── errors.go │ │ │ ├── corehandlers │ │ │ │ └── param_validator.go │ │ │ └── url_1_7.go │ │ │ └── private │ │ │ ├── util │ │ │ └── sort_keys.go │ │ │ ├── model │ │ │ └── api │ │ │ │ └── exportable_name.go │ │ │ └── protocol │ │ │ └── unmarshal.go │ │ ├── opencontainers │ │ └── runc │ │ │ ├── libcontainer │ │ │ ├── user │ │ │ │ ├── MAINTAINERS │ │ │ │ ├── lookup_unsupported.go │ │ │ │ └── lookup_unix.go │ │ │ └── system │ │ │ │ ├── unsupported.go │ │ │ │ ├── sysconfig.go │ │ │ │ ├── sysconfig_notcgo.go │ │ │ │ ├── syscall_linux_386.go │ │ │ │ ├── syscall_linux_arm.go │ │ │ │ └── syscall_linux_64.go │ │ │ └── NOTICE │ │ ├── Azure │ │ └── go-ansiterm │ │ │ ├── context.go │ │ │ ├── winterm │ │ │ └── utilities.go │ │ │ ├── utilities.go │ │ │ ├── ground_state.go │ │ │ └── osc_string_state.go │ │ ├── stretchr │ │ └── testify │ │ │ ├── require │ │ │ ├── require_forward.go.tmpl │ │ │ ├── require.go.tmpl │ │ │ ├── requirements.go │ │ │ └── forward_requirements.go │ │ │ └── assert │ │ │ ├── assertion_forward.go.tmpl │ │ │ ├── errors.go │ │ │ └── forward_assertions.go │ │ ├── pkg │ │ └── errors │ │ │ ├── .travis.yml │ │ │ ├── .gitignore │ │ │ └── appveyor.yml │ │ ├── cihub │ │ └── seelog │ │ │ └── internals_baseerror.go │ │ ├── vishvananda │ │ └── netlink │ │ │ ├── nl │ │ │ ├── nl_unspecified.go │ │ │ └── xfrm_monitor_linux.go │ │ │ ├── route_unspecified.go │ │ │ ├── netlink_linux.go │ │ │ ├── .travis.yml │ │ │ ├── link_tuntap_linux.go │ │ │ ├── neigh.go │ │ │ ├── socket.go │ │ │ ├── order.go │ │ │ └── Makefile │ │ ├── gorilla │ │ └── websocket │ │ │ ├── AUTHORS │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── conn_read.go │ │ │ └── conn_read_legacy.go │ │ ├── golang │ │ └── mock │ │ │ └── AUTHORS │ │ ├── containernetworking │ │ └── cni │ │ │ └── pkg │ │ │ └── invoke │ │ │ └── os_windows.go │ │ └── davecgh │ │ └── go-spew │ │ └── LICENSE ├── acs │ ├── model │ │ └── generate.go │ └── handler │ │ └── error.go ├── tcs │ └── model │ │ └── generate.go ├── Godeps │ └── Readme ├── gogenerate │ └── inflections.csv ├── functional_tests │ ├── testdata │ │ ├── simpletests_unix │ │ │ ├── hostname.json │ │ │ ├── user-nobody.json │ │ │ ├── dns-servers.json │ │ │ ├── extra-hosts.json │ │ │ ├── privileged.json │ │ │ ├── working-dir.json │ │ │ ├── datavolume.json │ │ │ ├── network-link.json │ │ │ ├── readonly-rootfs.json │ │ │ ├── ulimit-nofiles.json │ │ │ ├── disable-networking.json │ │ │ ├── dns-search-domains.json │ │ │ ├── add-drop-capabilities.json │ │ │ ├── parallel-pull.json │ │ │ ├── simple-exit.json │ │ │ ├── link-volume-depencies.json │ │ │ ├── security-opt-nonewprivileges.json │ │ │ └── datavolume2.json │ │ ├── simpletests_windows │ │ │ ├── hostname-windows.json │ │ │ ├── working-dir-windows.json │ │ │ ├── datavolume-windows.json │ │ │ └── simple-exit-windows.json │ │ └── taskdefinitions │ │ │ ├── nginx │ │ │ └── task-definition.json │ │ │ ├── network-mode │ │ │ └── task-definition.json │ │ │ ├── simple-exit │ │ │ └── task-definition.json │ │ │ ├── security-opt-nonewprivileges │ │ │ └── task-definition.json │ │ │ ├── nginx-port-5180 │ │ │ └── task-definition.json │ │ │ ├── simple-exit-authed │ │ │ └── task-definition.json │ │ │ ├── user-nobody │ │ │ └── task-definition.json │ │ │ ├── hostname │ │ │ └── task-definition.json │ │ │ ├── readonly-rootfs │ │ │ └── task-definition.json │ │ │ ├── savedstate-windows │ │ │ └── task-definition.json │ │ │ ├── working-dir │ │ │ └── task-definition.json │ │ │ ├── privileged │ │ │ └── task-definition.json │ │ │ ├── labels │ │ │ └── task-definition.json │ │ │ ├── simple-exit-windows │ │ │ └── task-definition.json │ │ │ ├── oom-container │ │ │ └── task-definition.json │ │ │ ├── dns-servers │ │ │ └── task-definition.json │ │ │ ├── invalid-image │ │ │ └── task-definition.json │ │ │ ├── network-mode-windows │ │ │ └── task-definition.json │ │ │ ├── hostname-windows │ │ │ └── task-definition.json │ │ │ ├── port-80-windows │ │ │ └── task-definition.json │ │ │ ├── telemetry │ │ │ └── task-definition.json │ │ │ ├── busybox-port-5180 │ │ │ └── task-definition.json │ │ │ ├── dns-search-domains │ │ │ └── task-definition.json │ │ │ ├── memory-overcommit │ │ │ └── task-definition.json │ │ │ ├── network-disabled │ │ │ └── task-definition.json │ │ │ ├── cleanup-windows │ │ │ └── task-definition.json │ │ │ ├── extra-hosts │ │ │ └── task-definition.json │ │ │ ├── working-dir-windows │ │ │ └── task-definition.json │ │ │ ├── labels-windows │ │ │ └── task-definition.json │ │ │ ├── nofiles-ulimit │ │ │ └── task-definition.json │ │ │ ├── logdriver-jsonfile │ │ │ └── task-definition.json │ │ │ ├── iam-roles-windows │ │ │ └── task-definition.json │ │ │ ├── network-link │ │ │ └── task-definition.json │ │ │ ├── iam-roles │ │ │ └── task-definition.json │ │ │ ├── logdriver-jsonfile-windows │ │ │ └── task-definition.json │ │ │ ├── add-drop-capabilities │ │ │ └── task-definition.json │ │ │ ├── awslogs │ │ │ └── task-definition.json │ │ │ ├── awslogs-windows │ │ │ └── task-definition.json │ │ │ ├── fluentd-tag │ │ │ └── task-definition.json │ │ │ ├── fluentd-log-tag │ │ │ └── task-definition.json │ │ │ └── fluentd-driver │ │ │ └── task-definition.json │ └── tests │ │ └── generated │ │ └── generate_tests.go ├── engine │ ├── testdata │ │ ├── load.go │ │ └── test_tasks │ │ │ └── circular_dependency.json │ ├── generate_mocks.go │ ├── dockeriface │ │ └── generate_mocks.go │ ├── dockerclient │ │ └── generate_mocks.go │ └── dockerstate │ │ └── generate_mocks.go ├── statemanager │ ├── dependencies │ │ └── noop.go │ ├── helper_unix_test.go │ └── generate_mocks.go ├── api │ ├── const_linux.go │ ├── const_windows.go │ ├── const_unknown.go │ └── generate_mocks.go ├── config │ └── interface.go ├── sighandlers │ └── debug_handler_windows.go ├── logger │ └── audit │ │ ├── request │ │ └── request.go │ │ └── generate_mocks.go ├── app │ ├── generate_mocks.go │ ├── oswrapper │ │ └── generate_mocks.go │ └── factory │ │ └── generate_mocks.go ├── async │ └── generate_mocks.go ├── ecr │ ├── model │ │ └── generate.go │ └── generate_mocks.go ├── eni │ ├── networkutils │ │ └── consts.go │ ├── pause │ │ └── generate_mocks.go │ ├── udevwrapper │ │ └── generate_mocks.go │ └── netlinkwrapper │ │ └── generate_mocks.go ├── ec2 │ ├── http │ │ └── generate_mocks.go │ └── generate_mocks.go ├── ecs_client │ └── model │ │ └── generate.go ├── utils │ ├── generate_mocks.go │ └── ttime │ │ └── generate_mocks.go └── credentials │ └── generate_mocks.go ├── scripts ├── registry │ └── nginx-auth │ │ └── registry.htpasswd ├── update-version ├── test ├── dockerfiles │ ├── Dockerfile.buildCNIPlugins │ └── Dockerfile.buildPause └── create-amazon-ecs-scratch ├── misc ├── awscli │ ├── Makefile │ └── Dockerfile ├── fluentd │ ├── Makefile │ ├── Dockerfile │ └── fluent.conf ├── squid │ ├── Makefile │ └── Dockerfile ├── certs │ ├── README.md │ └── Dockerfile ├── windows-listen80 │ └── listen80.dockerfile ├── gremlin │ └── Dockerfile ├── pause-container │ ├── Dockerfile │ ├── buildPause │ │ └── Makefile │ └── Makefile ├── windows-iam │ └── iamroles.dockerfile ├── netkitten │ ├── linux.dockerfile │ └── windows.dockerfile ├── volumes-test │ ├── Makefile │ ├── build.ps1 │ └── docker-image ├── testnnp │ ├── Makefile │ └── testnnp.c └── image-cleanup-test-images │ ├── linux0.dockerfile │ ├── linux1.dockerfile │ ├── linux2.dockerfile │ ├── windows0.dockerfile │ ├── windows1.dockerfile │ ├── windows2.dockerfile │ ├── windows3.dockerfile │ ├── windows4.dockerfile │ ├── windows5.dockerfile │ └── windows6.dockerfile ├── .gitmodules ├── .travis.yml ├── .gitignore └── appveyor.yml /VERSION: -------------------------------------------------------------------------------- 1 | 1.14.5 -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | agent/Godeps/_workspace/pkg/ 2 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/unix/.gitignore: -------------------------------------------------------------------------------- 1 | _obj/ 2 | -------------------------------------------------------------------------------- /agent/vendor/github.com/Microsoft/go-winio/.gitignore: -------------------------------------------------------------------------------- 1 | *.exe 2 | -------------------------------------------------------------------------------- /agent/vendor/github.com/Sirupsen/logrus/.gitignore: -------------------------------------------------------------------------------- 1 | logrus 2 | -------------------------------------------------------------------------------- /scripts/registry/nginx-auth/registry.htpasswd: -------------------------------------------------------------------------------- 1 | user:{PLAIN}swordfish 2 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/project/CONTRIBUTORS.md: -------------------------------------------------------------------------------- 1 | ../CONTRIBUTING.md -------------------------------------------------------------------------------- /agent/vendor/github.com/pborman/uuid/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | Paul Borman 2 | -------------------------------------------------------------------------------- /misc/awscli/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: all 2 | all: 3 | docker build -t amazon/awscli:make . 4 | -------------------------------------------------------------------------------- /misc/fluentd/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: all 2 | all: 3 | docker build -t amazon/fluentd:make . 4 | -------------------------------------------------------------------------------- /misc/squid/Makefile: -------------------------------------------------------------------------------- 1 | 2 | .PHONY: all 3 | all: 4 | docker build -t amazon/squid:make . 5 | 6 | -------------------------------------------------------------------------------- /agent/vendor/github.com/fsouza/go-dockerclient/.gitignore: -------------------------------------------------------------------------------- 1 | # temporary symlink for testing 2 | testing/data/symlink 3 | -------------------------------------------------------------------------------- /agent/vendor/github.com/jmespath/go-jmespath/.gitignore: -------------------------------------------------------------------------------- 1 | jpgo 2 | jmespath-fuzz.zip 3 | cpu.out 4 | go-jmespath.test 5 | -------------------------------------------------------------------------------- /agent/vendor/github.com/deniswernert/udev/README.md: -------------------------------------------------------------------------------- 1 | udev 2 | ==== 3 | 4 | Aims to provide a standalone udev replacement 5 | -------------------------------------------------------------------------------- /agent/acs/model/generate.go: -------------------------------------------------------------------------------- 1 | package model 2 | 3 | //go:generate go run -tags=codegen ../../gogenerate/awssdk.go -typesOnly=true 4 | -------------------------------------------------------------------------------- /agent/tcs/model/generate.go: -------------------------------------------------------------------------------- 1 | package model 2 | 3 | //go:generate go run -tags=codegen ../../gogenerate/awssdk.go -typesOnly=true 4 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/pkg/archive/README.md: -------------------------------------------------------------------------------- 1 | This code provides helper functions for dealing with archive files. 2 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "amazon-ecs-cni-plugins"] 2 | path = amazon-ecs-cni-plugins 3 | url = https://github.com/aws/amazon-ecs-cni-plugins.git 4 | -------------------------------------------------------------------------------- /agent/vendor/github.com/go-ini/ini/.gitignore: -------------------------------------------------------------------------------- 1 | testdata/conf_out.ini 2 | ini.sublime-project 3 | ini.sublime-workspace 4 | testdata/conf_reflect.ini 5 | -------------------------------------------------------------------------------- /agent/vendor/github.com/aws/aws-sdk-go/service/ec2/errors.go: -------------------------------------------------------------------------------- 1 | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 | 3 | package ec2 4 | -------------------------------------------------------------------------------- /misc/fluentd/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM fluent/fluentd@sha256:db333f72095e3b982e3f6b105d9c593840ab354beee6486d75536945d372453f 2 | 3 | COPY fluent.conf /fluentd/etc/ 4 | -------------------------------------------------------------------------------- /agent/vendor/github.com/opencontainers/runc/libcontainer/user/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Tianon Gravi (@tianon) 2 | Aleksa Sarai (@cyphar) 3 | -------------------------------------------------------------------------------- /agent/Godeps/Readme: -------------------------------------------------------------------------------- 1 | This directory tree is generated automatically by godep. 2 | 3 | Please do not edit. 4 | 5 | See https://github.com/tools/godep for more information. 6 | -------------------------------------------------------------------------------- /agent/vendor/github.com/aws/aws-sdk-go/NOTICE.txt: -------------------------------------------------------------------------------- 1 | AWS SDK for Go 2 | Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | Copyright 2014-2015 Stripe, Inc. 4 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | go: 4 | - 1.7 5 | go_import_path: github.com/aws/amazon-ecs-agent 6 | 7 | install: make get-deps 8 | script: 9 | - make test 10 | -------------------------------------------------------------------------------- /agent/vendor/github.com/Azure/go-ansiterm/context.go: -------------------------------------------------------------------------------- 1 | package ansiterm 2 | 3 | type ansiContext struct { 4 | currentChar byte 5 | paramBuffer []byte 6 | interBuffer []byte 7 | } 8 | -------------------------------------------------------------------------------- /agent/vendor/github.com/jmespath/go-jmespath/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | sudo: false 4 | 5 | go: 6 | - 1.4 7 | 8 | install: go get -v -t ./... 9 | script: make test 10 | -------------------------------------------------------------------------------- /agent/gogenerate/inflections.csv: -------------------------------------------------------------------------------- 1 | 2 | Transport: 3 | Ulimit: 4 | Driver: 5 | Networking: 6 | Filesystem: 7 | Soft: 8 | Ulimits: 9 | Domainname: 10 | Privileged: 11 | Readonly: 12 | 13 | -------------------------------------------------------------------------------- /agent/vendor/github.com/aws/aws-sdk-go/aws/context_1_7.go: -------------------------------------------------------------------------------- 1 | // +build go1.7 2 | 3 | package aws 4 | 5 | import "context" 6 | 7 | var ( 8 | backgroundCtx = context.Background() 9 | ) 10 | -------------------------------------------------------------------------------- /misc/squid/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine@sha256:fb9f16730ac6316afa4d97caa5130219927bfcecf0b0ce35c01dcb612f449739 2 | RUN apk update && apk add squid 3 | EXPOSE 3128 4 | ENTRYPOINT ["squid", "-Nd", "1"] 5 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/pkg/archive/archive_other.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package archive 4 | 5 | func getWhiteoutConverter(format WhiteoutFormat) tarWhiteoutConverter { 6 | return nil 7 | } 8 | -------------------------------------------------------------------------------- /agent/vendor/github.com/stretchr/testify/require/require_forward.go.tmpl: -------------------------------------------------------------------------------- 1 | {{.CommentWithoutT "a"}} 2 | func (a *Assertions) {{.DocInfo.Name}}({{.Params}}) { 3 | {{.DocInfo.Name}}(a.t, {{.ForwardedParams}}) 4 | } 5 | -------------------------------------------------------------------------------- /agent/vendor/github.com/Microsoft/go-winio/syscall.go: -------------------------------------------------------------------------------- 1 | package winio 2 | 3 | //go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall.go file.go pipe.go sd.go fileinfo.go privilege.go backup.go 4 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/net/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /misc/fluentd/fluent.conf: -------------------------------------------------------------------------------- 1 | 2 | @type forward 3 | port 24224 4 | 5 | 6 | 7 | @type file 8 | path /fluentd/log/ftslog/ecsfts.*.log 9 | flush_interval 1s 10 | 11 | -------------------------------------------------------------------------------- /agent/vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl: -------------------------------------------------------------------------------- 1 | {{.CommentWithoutT "a"}} 2 | func (a *Assertions) {{.DocInfo.Name}}({{.Params}}) bool { 3 | return {{.DocInfo.Name}}(a.t, {{.ForwardedParams}}) 4 | } 5 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/net/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/tools/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/tools/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/pkg/archive/copy_windows.go: -------------------------------------------------------------------------------- 1 | package archive 2 | 3 | import ( 4 | "path/filepath" 5 | ) 6 | 7 | func normalizePath(path string) string { 8 | return filepath.FromSlash(path) 9 | } 10 | -------------------------------------------------------------------------------- /agent/vendor/github.com/stretchr/testify/require/require.go.tmpl: -------------------------------------------------------------------------------- 1 | {{.Comment}} 2 | func {{.DocInfo.Name}}(t TestingT, {{.Params}}) { 3 | if !assert.{{.DocInfo.Name}}(t, {{.ForwardedParams}}) { 4 | t.FailNow() 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /agent/vendor/github.com/pkg/errors/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go_import_path: github.com/pkg/errors 3 | go: 4 | - 1.4.3 5 | - 1.5.4 6 | - 1.6.3 7 | - 1.7.3 8 | - tip 9 | 10 | script: 11 | - go test -v ./... 12 | -------------------------------------------------------------------------------- /agent/vendor/github.com/Sirupsen/logrus/terminal_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package logrus 4 | 5 | // IsTerminal returns true if stderr's file descriptor is a terminal. 6 | func IsTerminal() bool { 7 | return true 8 | } 9 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/opts/hosts_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package opts 4 | 5 | // DefaultHost constant defines the default host string used by docker on Windows 6 | var DefaultHost = "npipe://" + DefaultNamedPipe 7 | -------------------------------------------------------------------------------- /agent/vendor/github.com/Sirupsen/logrus/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.3 4 | - 1.4 5 | - 1.5 6 | - 1.6 7 | - tip 8 | install: 9 | - go get -t ./... 10 | script: GOMAXPROCS=4 GORACE="halt_on_error=1" go test -race -v ./... 11 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/pkg/archive/copy_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package archive 4 | 5 | import ( 6 | "path/filepath" 7 | ) 8 | 9 | func normalizePath(path string) string { 10 | return filepath.ToSlash(path) 11 | } 12 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/pkg/fileutils/fileutils_windows.go: -------------------------------------------------------------------------------- 1 | package fileutils 2 | 3 | // GetTotalUsedFds Returns the number of used File Descriptors. Not supported 4 | // on Windows. 5 | func GetTotalUsedFds() int { 6 | return -1 7 | } 8 | -------------------------------------------------------------------------------- /agent/vendor/github.com/cihub/seelog/internals_baseerror.go: -------------------------------------------------------------------------------- 1 | package seelog 2 | 3 | // Base struct for custom errors. 4 | type baseError struct { 5 | message string 6 | } 7 | 8 | func (be baseError) Error() string { 9 | return be.message 10 | } 11 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/opts/opts_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package opts 4 | 5 | // DefaultHTTPHost Default HTTP Host used if only port is provided to -H flag e.g. docker daemon -H tcp://:8080 6 | const DefaultHTTPHost = "localhost" 7 | -------------------------------------------------------------------------------- /agent/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/options.go: -------------------------------------------------------------------------------- 1 | package v4 2 | 3 | // WithUnsignedPayload will enable and set the UnsignedPayload field to 4 | // true of the signer. 5 | func WithUnsignedPayload(v4 *Signer) { 6 | v4.UnsignedPayload = true 7 | } 8 | -------------------------------------------------------------------------------- /agent/vendor/github.com/vishvananda/netlink/nl/nl_unspecified.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package nl 4 | 5 | import "encoding/binary" 6 | 7 | var SupportedNlFamilies = []int{} 8 | 9 | func NativeEndian() binary.ByteOrder { 10 | return nil 11 | } 12 | -------------------------------------------------------------------------------- /agent/vendor/github.com/gorilla/websocket/AUTHORS: -------------------------------------------------------------------------------- 1 | # This is the official list of Gorilla WebSocket authors for copyright 2 | # purposes. 3 | # 4 | # Please keep the list sorted. 5 | 6 | Gary Burd 7 | Joachim Bauch 8 | 9 | -------------------------------------------------------------------------------- /agent/vendor/github.com/opencontainers/runc/libcontainer/system/unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package system 4 | 5 | // RunningInUserNS is a stub for non-Linux systems 6 | // Always returns false 7 | func RunningInUserNS() bool { 8 | return false 9 | } 10 | -------------------------------------------------------------------------------- /agent/vendor/github.com/vishvananda/netlink/route_unspecified.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package netlink 4 | 5 | func (r *Route) ListFlags() []string { 6 | return []string{} 7 | } 8 | 9 | func (n *NexthopInfo) ListFlags() []string { 10 | return []string{} 11 | } 12 | -------------------------------------------------------------------------------- /agent/vendor/github.com/Sirupsen/logrus/terminal_bsd.go: -------------------------------------------------------------------------------- 1 | // +build darwin freebsd openbsd netbsd dragonfly 2 | // +build !appengine 3 | 4 | package logrus 5 | 6 | import "syscall" 7 | 8 | const ioctlReadTermios = syscall.TIOCGETA 9 | 10 | type Termios syscall.Termios 11 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/pkg/fileutils/fileutils_solaris.go: -------------------------------------------------------------------------------- 1 | package fileutils 2 | 3 | // GetTotalUsedFds Returns the number of used File Descriptors. 4 | // On Solaris these limits are per process and not systemwide 5 | func GetTotalUsedFds() int { 6 | return -1 7 | } 8 | -------------------------------------------------------------------------------- /agent/vendor/github.com/jmespath/go-jmespath/README.md: -------------------------------------------------------------------------------- 1 | # go-jmespath - A JMESPath implementation in Go 2 | 3 | [![Build Status](https://img.shields.io/travis/jmespath/go-jmespath.svg)](https://travis-ci.org/jmespath/go-jmespath) 4 | 5 | 6 | 7 | See http://jmespath.org for more info. 8 | -------------------------------------------------------------------------------- /agent/vendor/github.com/opencontainers/runc/libcontainer/system/sysconfig.go: -------------------------------------------------------------------------------- 1 | // +build cgo,linux cgo,freebsd 2 | 3 | package system 4 | 5 | /* 6 | #include 7 | */ 8 | import "C" 9 | 10 | func GetClockTicks() int { 11 | return int(C.sysconf(C._SC_CLK_TCK)) 12 | } 13 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/simpletests_unix/hostname.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "Hostname", 3 | "Description": "Check that hostname works", 4 | "TaskDefinition": "hostname", 5 | "Version": ">=1.5.0", 6 | "Timeout": "2m", 7 | "ExitCodes": { 8 | "exit": 42 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /agent/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8.go: -------------------------------------------------------------------------------- 1 | // +build go1.8 2 | 3 | package request 4 | 5 | import "net/http" 6 | 7 | // Is a http.NoBody reader instructing Go HTTP client to not include 8 | // and body in the HTTP request. 9 | var noBodyReader = http.NoBody 10 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/opts/hosts_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package opts 4 | 5 | import "fmt" 6 | 7 | // DefaultHost constant defines the default host string used by docker on other hosts than Windows 8 | var DefaultHost = fmt.Sprintf("unix://%s", DefaultUnixSocket) 9 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/simpletests_unix/user-nobody.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "UserNobody", 3 | "Description": "Check that user works", 4 | "TaskDefinition": "user-nobody", 5 | "Version": ">=1.5.0", 6 | "Timeout": "2m", 7 | "ExitCodes": { 8 | "exit": 42 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /misc/awscli/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian@sha256:8b1fc3a7a55c42e3445155b2f8f40c55de5f8bc8012992b26b570530c4bded9e 2 | 3 | RUN apt-get update && apt-get install -y \ 4 | python2.7 curl 5 | 6 | RUN curl -O https://bootstrap.pypa.io/get-pip.py 7 | 8 | RUN python2.7 get-pip.py && pip install awscli 9 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/simpletests_unix/dns-servers.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "DnsServers", 3 | "Description": "Check that dns servers works", 4 | "TaskDefinition": "dns-servers", 5 | "Version": ">=1.5.0", 6 | "Timeout": "2m", 7 | "ExitCodes": { 8 | "exit": 42 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/simpletests_unix/extra-hosts.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "ExtraHosts", 3 | "Description": "Check that extra hosts works", 4 | "TaskDefinition": "extra-hosts", 5 | "Version": ">=1.5.0", 6 | "Timeout": "2m", 7 | "ExitCodes": { 8 | "exit": 42 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/simpletests_unix/privileged.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "Privileged", 3 | "Description": "Check that privileged works", 4 | "TaskDefinition": "privileged", 5 | "Version": ">=1.5.0", 6 | "Timeout": "2m", 7 | "ExitCodes": { 8 | "exit": 42 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/simpletests_unix/working-dir.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "WorkingDir", 3 | "Description": "Check that working dir works", 4 | "TaskDefinition": "working-dir", 5 | "Version": ">=1.5.0", 6 | "Timeout": "2m", 7 | "ExitCodes": { 8 | "exit": 42 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /agent/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package request 4 | 5 | import ( 6 | "strings" 7 | ) 8 | 9 | func isErrConnectionReset(err error) bool { 10 | return strings.Contains(err.Error(), "connection reset") 11 | } 12 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/pkg/system/errors.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import ( 4 | "errors" 5 | ) 6 | 7 | var ( 8 | // ErrNotSupportedPlatform means the platform is not supported. 9 | ErrNotSupportedPlatform = errors.New("platform and architecture is not supported") 10 | ) 11 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/pkg/system/meminfo_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!windows,!solaris 2 | 3 | package system 4 | 5 | // ReadMemInfo is not supported on platforms other than linux and windows. 6 | func ReadMemInfo() (*MemInfo, error) { 7 | return nil, ErrNotSupportedPlatform 8 | } 9 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/simpletests_unix/datavolume.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "DataVolume", 3 | "Description": "Check that basic data volumes work", 4 | "TaskDefinition": "datavolume", 5 | "Version": ">=1.0.0", 6 | "Timeout": "2m", 7 | "ExitCodes": { 8 | "exit": 42 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/simpletests_windows/hostname-windows.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "Hostname", 3 | "Description": "Check that hostname works", 4 | "TaskDefinition": "hostname-windows", 5 | "Version": ">=1.5.0", 6 | "Timeout": "2m", 7 | "ExitCodes": { 8 | "exit": 42 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /agent/vendor/github.com/aws/aws-sdk-go/aws/version.go: -------------------------------------------------------------------------------- 1 | // Package aws provides core functionality for making requests to AWS services. 2 | package aws 3 | 4 | // SDKName is the name of this AWS SDK 5 | const SDKName = "aws-sdk-go" 6 | 7 | // SDKVersion is the version of this SDK 8 | const SDKVersion = "1.8.19" 9 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/simpletests_unix/network-link.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "NetworkLink", 3 | "Description": "Tests that basic network linking works", 4 | "TaskDefinition": "network-link", 5 | "Version": ">=1.0.0", 6 | "Timeout": "2m", 7 | "ExitCodes": { 8 | "exit": 42 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/simpletests_unix/readonly-rootfs.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "ReadonlyRootfs", 3 | "Description": "Check that readonly rootfs works", 4 | "TaskDefinition": "readonly-rootfs", 5 | "Version": ">=1.5.0", 6 | "Timeout": "2m", 7 | "ExitCodes": { 8 | "exit": 42 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/simpletests_unix/ulimit-nofiles.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "NofilesULimit", 3 | "Description": "Check that nofiles ulimit works", 4 | "TaskDefinition": "nofiles-ulimit", 5 | "Version": ">=1.5.0", 6 | "Timeout": "2m", 7 | "ExitCodes": { 8 | "exit": 42 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/pkg/ioutils/temp_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package ioutils 4 | 5 | import "io/ioutil" 6 | 7 | // TempDir on Unix systems is equivalent to ioutil.TempDir. 8 | func TempDir(dir, prefix string) (string, error) { 9 | return ioutil.TempDir(dir, prefix) 10 | } 11 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/simpletests_windows/working-dir-windows.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "WorkingDir", 3 | "Description": "Check that working dir works", 4 | "TaskDefinition": "working-dir-windows", 5 | "Version": ">=1.5.0", 6 | "Timeout": "2m", 7 | "ExitCodes": { 8 | "exit": 42 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/pkg/system/umask_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package system 4 | 5 | // Umask is not supported on the windows platform. 6 | func Umask(newmask int) (oldmask int, err error) { 7 | // should not be called on cli code path 8 | return 0, ErrNotSupportedPlatform 9 | } 10 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/simpletests_unix/disable-networking.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "DisableNetworking", 3 | "Description": "Check that disable networking works", 4 | "TaskDefinition": "network-disabled", 5 | "Version": ">=1.5.0", 6 | "Timeout": "2m", 7 | "ExitCodes": { 8 | "exit": 42 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/simpletests_windows/datavolume-windows.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "DataVolume", 3 | "Description": "Check that basic data volumes work", 4 | "TaskDefinition": "datavolume-windows", 5 | "Version": ">=1.0.0", 6 | "Timeout": "2m", 7 | "ExitCodes": { 8 | "exit": 42 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/pkg/system/utimes_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!freebsd 2 | 3 | package system 4 | 5 | import "syscall" 6 | 7 | // LUtimesNano is only supported on linux and freebsd. 8 | func LUtimesNano(path string, ts []syscall.Timespec) error { 9 | return ErrNotSupportedPlatform 10 | } 11 | -------------------------------------------------------------------------------- /agent/vendor/github.com/vishvananda/netlink/netlink_linux.go: -------------------------------------------------------------------------------- 1 | package netlink 2 | 3 | import "github.com/vishvananda/netlink/nl" 4 | 5 | // Family type definitions 6 | const ( 7 | FAMILY_ALL = nl.FAMILY_ALL 8 | FAMILY_V4 = nl.FAMILY_V4 9 | FAMILY_V6 = nl.FAMILY_V6 10 | FAMILY_MPLS = nl.FAMILY_MPLS 11 | ) 12 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/simpletests_unix/dns-search-domains.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "DnsSearchDomains", 3 | "Description": "Check that dns search domains works", 4 | "TaskDefinition": "dns-search-domains", 5 | "Version": ">=1.5.0", 6 | "Timeout": "2m", 7 | "ExitCodes": { 8 | "exit": 42 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/taskdefinitions/nginx/task-definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "ecsftest-nginx", 3 | "containerDefinitions": [{ 4 | "image": "127.0.0.1:51670/nginx:latest", 5 | "name": "nginx", 6 | "portBindings": [{ 7 | "containerPort": 80 8 | }], 9 | "memory": 50 10 | }] 11 | } 12 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/tools/go/ast/astutil/util.go: -------------------------------------------------------------------------------- 1 | package astutil 2 | 3 | import "go/ast" 4 | 5 | // Unparen returns e with any enclosing parentheses stripped. 6 | func Unparen(e ast.Expr) ast.Expr { 7 | for { 8 | p, ok := e.(*ast.ParenExpr) 9 | if !ok { 10 | return e 11 | } 12 | e = p.X 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | misc/certs/ca-certificates.crt 2 | misc/netkitten/netkitten 3 | out/ 4 | coverage/ 5 | _bin/ 6 | *.exe 7 | *.zip 8 | *.swp 9 | *.orig 10 | /agent/version/_version.go 11 | /misc/gremlin/gremlin 12 | .agignore 13 | *.sublime-* 14 | .DS_Store 15 | /misc/windows-iam/devcon* 16 | /misc/pause-container/pause 17 | *-stamp 18 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/go-units/circle.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | post: 3 | # install golint 4 | - go get github.com/golang/lint/golint 5 | 6 | test: 7 | pre: 8 | # run analysis before tests 9 | - go vet ./... 10 | - test -z "$(golint ./... | tee /dev/stderr)" 11 | - test -z "$(gofmt -s -l . | tee /dev/stderr)" 12 | -------------------------------------------------------------------------------- /agent/vendor/github.com/stretchr/testify/require/requirements.go: -------------------------------------------------------------------------------- 1 | package require 2 | 3 | // TestingT is an interface wrapper around *testing.T 4 | type TestingT interface { 5 | Errorf(format string, args ...interface{}) 6 | FailNow() 7 | } 8 | 9 | //go:generate go run ../_codegen/main.go -output-package=require -template=require.go.tmpl 10 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/pkg/system/umask.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package system 4 | 5 | import ( 6 | "syscall" 7 | ) 8 | 9 | // Umask sets current process's file mode creation mask to newmask 10 | // and returns oldmask. 11 | func Umask(newmask int) (oldmask int, err error) { 12 | return syscall.Umask(newmask), nil 13 | } 14 | -------------------------------------------------------------------------------- /agent/vendor/github.com/fsouza/go-dockerclient/DOCKER-LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | You can find the Docker license at the following link: 6 | https://raw.githubusercontent.com/docker/docker/master/LICENSE 7 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/simpletests_unix/add-drop-capabilities.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "AddAndDropCapabilities", 3 | "Description": "checks that adding and dropping Linux capabilities work", 4 | "TaskDefinition": "add-drop-capabilities", 5 | "Version": ">=1.0.0", 6 | "Timeout": "2m", 7 | "ExitCodes": { 8 | "exit": 42 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/simpletests_unix/parallel-pull.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "ParallelPull", 3 | "Description": "check docker pull in parallel works for docker >= 1.11.1", 4 | "TaskDefinition": "parallel-pull", 5 | "Version": ">=1.0.0", 6 | "DockerVersion": ">=1.11.1", 7 | "Timeout": "1m", 8 | "Count": 4, 9 | "Daemon": true 10 | } 11 | -------------------------------------------------------------------------------- /agent/vendor/github.com/vishvananda/netlink/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | before_script: 3 | # make sure we keep path in tact when we sudo 4 | - sudo sed -i -e 's/^Defaults\tsecure_path.*$//' /etc/sudoers 5 | # modprobe ip_gre or else the first gre device can't be deleted 6 | - sudo modprobe ip_gre 7 | install: 8 | - go get github.com/vishvananda/netns 9 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/windows/registry/mksyscall.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package registry 6 | 7 | //go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go syscall.go 8 | -------------------------------------------------------------------------------- /misc/certs/README.md: -------------------------------------------------------------------------------- 1 | The "scratch" docker image obviously does not contain any certificates. Since 2 | the Amazon ECS Agent is build in scratch but makes heavy use of tls, it needs a 3 | certificate store to trust. 4 | 5 | This directory is meant to generate a store suitable for use by our agent. 6 | 7 | Specifically, it uses debian's certificate store 8 | 9 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/simpletests_unix/simple-exit.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "SimpleExit", 3 | "Description": "Tests that the basic premis of this testing fromwork works (e.g. exit codes go through, etc)", 4 | "TaskDefinition": "simple-exit", 5 | "Version": ">=1.0.0", 6 | "Timeout": "2m", 7 | "ExitCodes": { 8 | "exit": 42 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/taskdefinitions/network-mode/task-definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "ecsftest-networkmode", 3 | "networkMode": "$$$$NETWORK_MODE$$$$", 4 | "containerDefinitions": [{ 5 | "image": "busybox:latest", 6 | "command": ["sleep", "1m"], 7 | "name": "network-$$$$NETWORK_MODE$$$$", 8 | "memory": 50 9 | }] 10 | } 11 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/taskdefinitions/simple-exit/task-definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "ecsinteg-simple-exit", 3 | "containerDefinitions": [{ 4 | "image": "127.0.0.1:51670/busybox:latest", 5 | "name": "exit", 6 | "cpu": 10, 7 | "memory": 10, 8 | "essential": true, 9 | "command": ["sh", "-c", "exit 42"] 10 | }] 11 | } 12 | -------------------------------------------------------------------------------- /agent/vendor/github.com/aws/aws-sdk-go/aws/credentials/example.ini: -------------------------------------------------------------------------------- 1 | [default] 2 | aws_access_key_id = accessKey 3 | aws_secret_access_key = secret 4 | aws_session_token = token 5 | 6 | [no_token] 7 | aws_access_key_id = accessKey 8 | aws_secret_access_key = secret 9 | 10 | [with_colon] 11 | aws_access_key_id: accessKey 12 | aws_secret_access_key: secret 13 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/simpletests_unix/link-volume-depencies.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "LinkVolumeDependencies", 3 | "Description": "Tests that the dependency graph of task definitions is resolved correctly", 4 | "TaskDefinition": "network-link-2", 5 | "Version": ">=1.0.0", 6 | "Timeout": "2m", 7 | "ExitCodes": { 8 | "exit": 42 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/simpletests_unix/security-opt-nonewprivileges.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "SecurityOptNoNewPrivileges", 3 | "Description": "Check that security-opt=no-new-privileges works", 4 | "TaskDefinition": "security-opt-nonewprivileges", 5 | "Version": ">=1.12.1", 6 | "Timeout": "2m", 7 | "ExitCodes": { 8 | "exit": 42 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /agent/vendor/github.com/aws/aws-sdk-go/aws/url.go: -------------------------------------------------------------------------------- 1 | // +build go1.8 2 | 3 | package aws 4 | 5 | import "net/url" 6 | 7 | // URLHostname will extract the Hostname without port from the URL value. 8 | // 9 | // Wrapper of net/url#URL.Hostname for backwards Go version compatibility. 10 | func URLHostname(url *url.URL) string { 11 | return url.Hostname() 12 | } 13 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/taskdefinitions/security-opt-nonewprivileges/task-definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "security-opt-nonewprivileges", 3 | "containerDefinitions": [{ 4 | "image": "amazon/testnnp:make", 5 | "name": "exit", 6 | "portBindings": [], 7 | "memory": 50, 8 | "dockerSecurityOptions": ["no-new-privileges"] 9 | }] 10 | } 11 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/pkg/archive/time_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package archive 4 | 5 | import ( 6 | "syscall" 7 | "time" 8 | ) 9 | 10 | func timeToTimespec(time time.Time) (ts syscall.Timespec) { 11 | nsec := int64(0) 12 | if !time.IsZero() { 13 | nsec = time.UnixNano() 14 | } 15 | return syscall.NsecToTimespec(nsec) 16 | } 17 | -------------------------------------------------------------------------------- /agent/vendor/github.com/pborman/uuid/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // The uuid package generates and inspects UUIDs. 6 | // 7 | // UUIDs are based on RFC 4122 and DCE 1.1: Authentication and Security Services. 8 | package uuid 9 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/taskdefinitions/nginx-port-5180/task-definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "ecsftest-nginx-port-5180", 3 | "containerDefinitions": [{ 4 | "image": "127.0.0.1:51670/nginx:latest", 5 | "name": "nginx", 6 | "portBindings": [{ 7 | "containerPort": 80, 8 | "hostPort": 5180 9 | }], 10 | "memory": 50 11 | }] 12 | } 13 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/taskdefinitions/simple-exit-authed/task-definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "ecsftest-simple-exit-authed", 3 | "containerDefinitions": [{ 4 | "image": "127.0.0.1:51671/busybox:latest", 5 | "name": "exit", 6 | "cpu": 10, 7 | "memory": 10, 8 | "essential": true, 9 | "command": ["sh", "-c", "exit 42"] 10 | }] 11 | } 12 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/simpletests_windows/simple-exit-windows.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "SimpleExit", 3 | "Description": "Tests that the basic premis of this testing fromwork works (e.g. exit codes go through, etc)", 4 | "TaskDefinition": "simple-exit-windows", 5 | "Version": ">=1.0.0", 6 | "Timeout": "2m", 7 | "ExitCodes": { 8 | "exit": 42 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /agent/vendor/github.com/aws/aws-sdk-go/private/util/sort_keys.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import "sort" 4 | 5 | // SortedKeys returns a sorted slice of keys of a map. 6 | func SortedKeys(m map[string]interface{}) []string { 7 | i, sorted := 0, make([]string, len(m)) 8 | for k := range m { 9 | sorted[i] = k 10 | i++ 11 | } 12 | sort.Strings(sorted) 13 | return sorted 14 | } 15 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/unix/constants.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | const ( 10 | R_OK = 0x4 11 | W_OK = 0x2 12 | X_OK = 0x1 13 | ) 14 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/taskdefinitions/user-nobody/task-definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "ecs-ftest-user-nobody", 3 | "containerDefinitions": [{ 4 | "image": "busybox:latest", 5 | "name": "exit", 6 | "cpu": 10, 7 | "memory": 10, 8 | "user": "nobody", 9 | "command": ["sh", "-c", "[ \"$(whoami)\" == \"nobody\" ] && exit 42 || exit 1"] 10 | }] 11 | } 12 | -------------------------------------------------------------------------------- /agent/vendor/github.com/Azure/go-ansiterm/winterm/utilities.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package winterm 4 | 5 | // AddInRange increments a value by the passed quantity while ensuring the values 6 | // always remain within the supplied min / max range. 7 | func addInRange(n int16, increment int16, min int16, max int16) int16 { 8 | return ensureInRange(n+increment, min, max) 9 | } 10 | -------------------------------------------------------------------------------- /agent/vendor/github.com/aws/aws-sdk-go/aws/client/metadata/client_info.go: -------------------------------------------------------------------------------- 1 | package metadata 2 | 3 | // ClientInfo wraps immutable data from the client.Client structure. 4 | type ClientInfo struct { 5 | ServiceName string 6 | APIVersion string 7 | Endpoint string 8 | SigningName string 9 | SigningRegion string 10 | JSONVersion string 11 | TargetPrefix string 12 | } 13 | -------------------------------------------------------------------------------- /agent/vendor/github.com/aws/aws-sdk-go/service/sts/customizations.go: -------------------------------------------------------------------------------- 1 | package sts 2 | 3 | import "github.com/aws/aws-sdk-go/aws/request" 4 | 5 | func init() { 6 | initRequest = func(r *request.Request) { 7 | switch r.Operation.Name { 8 | case opAssumeRoleWithSAML, opAssumeRoleWithWebIdentity: 9 | r.Handlers.Sign.Clear() // these operations are unsigned 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/pkg/promise/promise.go: -------------------------------------------------------------------------------- 1 | package promise 2 | 3 | // Go is a basic promise implementation: it wraps calls a function in a goroutine, 4 | // and returns a channel which will later return the function's return value. 5 | func Go(f func() error) chan error { 6 | ch := make(chan error, 1) 7 | go func() { 8 | ch <- f() 9 | }() 10 | return ch 11 | } 12 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/taskdefinitions/hostname/task-definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "ecsftest-hostname", 3 | "containerDefinitions": [{ 4 | "image": "busybox:latest", 5 | "name": "exit", 6 | "cpu": 10, 7 | "memory": 10, 8 | "hostname": "foobarbaz", 9 | "command": ["sh", "-c", "[ \"$(hostname)\" == \"foobarbaz\" ] && exit 42 || exit 1"] 10 | }] 11 | } 12 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/taskdefinitions/readonly-rootfs/task-definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "ecsinteg-privileged-mount", 3 | "containerDefinitions": [{ 4 | "image": "busybox:latest", 5 | "name": "exit", 6 | "cpu": 10, 7 | "memory": 10, 8 | "readonlyRootFilesystem": true, 9 | "command": ["sh", "-c", "touch /readonly && exit 1 || exit 42"] 10 | }] 11 | } 12 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/taskdefinitions/savedstate-windows/task-definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "ecsftest-savedstate-windows", 3 | "containerDefinitions": [{ 4 | "image": "microsoft/windowsservercore:latest", 5 | "name": "savedstate-windows", 6 | "cpu": 10, 7 | "memory": 10, 8 | "entryPoint": ["powershell"], 9 | "command": ["sleep", "500"] 10 | }] 11 | } 12 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/taskdefinitions/working-dir/task-definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "ecsftest-working-dir", 3 | "containerDefinitions": [{ 4 | "image": "busybox:latest", 5 | "name": "exit", 6 | "cpu": 10, 7 | "memory": 10, 8 | "workingDirectory": "/var", 9 | "command": ["sh", "-c", "[ \"$(pwd)\" == \"/var\" ] && exit 42 || exit 1"] 10 | }] 11 | } 12 | -------------------------------------------------------------------------------- /agent/vendor/github.com/Sirupsen/logrus/terminal_solaris.go: -------------------------------------------------------------------------------- 1 | // +build solaris,!appengine 2 | 3 | package logrus 4 | 5 | import ( 6 | "os" 7 | 8 | "golang.org/x/sys/unix" 9 | ) 10 | 11 | // IsTerminal returns true if the given file descriptor is a terminal. 12 | func IsTerminal() bool { 13 | _, err := unix.IoctlGetTermios(int(os.Stdout.Fd()), unix.TCGETA) 14 | return err == nil 15 | } 16 | -------------------------------------------------------------------------------- /agent/vendor/github.com/aws/aws-sdk-go/aws/jsonvalue.go: -------------------------------------------------------------------------------- 1 | package aws 2 | 3 | // JSONValue is a representation of a grab bag type that will be marshaled 4 | // into a json string. This type can be used just like any other map. 5 | // 6 | // Example: 7 | // 8 | // values := aws.JSONValue{ 9 | // "Foo": "Bar", 10 | // } 11 | // values["Baz"] = "Qux" 12 | type JSONValue map[string]interface{} 13 | -------------------------------------------------------------------------------- /agent/vendor/github.com/aws/aws-sdk-go/private/model/api/exportable_name.go: -------------------------------------------------------------------------------- 1 | // +build codegen 2 | 3 | package api 4 | 5 | import "strings" 6 | 7 | // ExportableName a name which is exportable as a value or name in Go code 8 | func (a *API) ExportableName(name string) string { 9 | if name == "" { 10 | return name 11 | } 12 | 13 | return strings.ToUpper(name[0:1]) + name[1:] 14 | } 15 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/windows/mksyscall.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | //go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go 8 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/pkg/archive/time_linux.go: -------------------------------------------------------------------------------- 1 | package archive 2 | 3 | import ( 4 | "syscall" 5 | "time" 6 | ) 7 | 8 | func timeToTimespec(time time.Time) (ts syscall.Timespec) { 9 | if time.IsZero() { 10 | // Return UTIME_OMIT special value 11 | ts.Sec = 0 12 | ts.Nsec = ((1 << 30) - 2) 13 | return 14 | } 15 | return syscall.NsecToTimespec(time.UnixNano()) 16 | } 17 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/unix/syscall_no_getwd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build dragonfly freebsd netbsd openbsd 6 | 7 | package unix 8 | 9 | const ImplementsGetwd = false 10 | 11 | func Getwd() (string, error) { return "", ENOTSUP } 12 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/unix/zsysnum_solaris_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,solaris 6 | 7 | package unix 8 | 9 | // TODO(aram): remove these before Go 1.3. 10 | const ( 11 | SYS_EXECVE = 59 12 | SYS_FCNTL = 62 13 | ) 14 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/taskdefinitions/privileged/task-definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "ecsinteg-privileged-mount", 3 | "containerDefinitions": [{ 4 | "image": "busybox:latest", 5 | "name": "exit", 6 | "cpu": 10, 7 | "memory": 10, 8 | "privileged": true, 9 | "command": ["sh", "-c", "mkdir /test && mount --rbind /test /tmp && exit 42 || exit 1"] 10 | }] 11 | } 12 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/pkg/system/chtimes_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package system 4 | 5 | import ( 6 | "time" 7 | ) 8 | 9 | //setCTime will set the create time on a file. On Unix, the create 10 | //time is updated as a side effect of setting the modified time, so 11 | //no action is required. 12 | func setCTime(path string, ctime time.Time) error { 13 | return nil 14 | } 15 | -------------------------------------------------------------------------------- /agent/vendor/github.com/vishvananda/netlink/link_tuntap_linux.go: -------------------------------------------------------------------------------- 1 | package netlink 2 | 3 | // ideally golang.org/x/sys/unix would define IfReq but it only has 4 | // IFNAMSIZ, hence this minimalistic implementation 5 | const ( 6 | SizeOfIfReq = 40 7 | IFNAMSIZ = 16 8 | ) 9 | 10 | type ifReq struct { 11 | Name [IFNAMSIZ]byte 12 | Flags uint16 13 | pad [SizeOfIfReq - IFNAMSIZ - 2]byte 14 | } 15 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/taskdefinitions/labels/task-definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "ecsftest-labels", 3 | "containerDefinitions": [{ 4 | "image": "busybox:latest", 5 | "name": "labeled", 6 | "cpu": 10, 7 | "memory": 10, 8 | "dockerLabels": { 9 | "label1": "", 10 | "com.foo.label2": "value" 11 | }, 12 | "command": ["sh", "-c", "exit 0"] 13 | }] 14 | } 15 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/taskdefinitions/simple-exit-windows/task-definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "ecsinteg-simple-exit-windows", 3 | "containerDefinitions": [{ 4 | "image": "microsoft/windowsservercore:latest", 5 | "name": "exit", 6 | "cpu": 10, 7 | "memory": 10, 8 | "essential": true, 9 | "entryPoint": ["powershell"], 10 | "command": ["exit", "42"] 11 | }] 12 | } 13 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,linux 6 | // +build !gccgo 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | //go:noescape 13 | func gettimeofday(tv *Timeval) (err syscall.Errno) 14 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/taskdefinitions/oom-container/task-definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "ecsftest-oom-container", 3 | "containerDefinitions": [{ 4 | "essential": true, 5 | "memory": 10, 6 | "name": "error", 7 | "cpu": 1, 8 | "image": "127.0.0.1:51670/python:2", 9 | "command": ["python", "-c", "foo=' '*1024*1024*1024; import time; time.sleep(10)"] 10 | }] 11 | } 12 | 13 | -------------------------------------------------------------------------------- /agent/vendor/github.com/deniswernert/udev/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/pkg/system/mknod_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package system 4 | 5 | // Mknod is not implemented on Windows. 6 | func Mknod(path string, mode uint32, dev int) error { 7 | return ErrNotSupportedPlatform 8 | } 9 | 10 | // Mkdev is not implemented on Windows. 11 | func Mkdev(major int64, minor int64) uint32 { 12 | panic("Mkdev not implemented on Windows.") 13 | } 14 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/unix/env_unset.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.4 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | func Unsetenv(key string) error { 12 | // This was added in Go 1.4. 13 | return syscall.Unsetenv(key) 14 | } 15 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/taskdefinitions/dns-servers/task-definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "ecsftest-dns-servers", 3 | "containerDefinitions": [{ 4 | "image": "busybox:latest", 5 | "name": "exit", 6 | "cpu": 10, 7 | "memory": 10, 8 | "dnsServers": ["1.2.3.4"], 9 | "command": ["sh", "-c", "egrep \"nameserver\\s+1\\.2\\.3\\.4\" /etc/resolv.conf && exit 42 || exit 1"] 10 | }] 11 | } 12 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/taskdefinitions/invalid-image/task-definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "ecsinteg-invalid-image", 3 | "containerDefinitions": [{ 4 | "volumesFrom": [], 5 | "portMappings": [{ 6 | "containerPort": 80 7 | }], 8 | "essential": true, 9 | "memory": 256, 10 | "name": "error", 11 | "cpu": 1, 12 | "image": "example.com/nonexistent" 13 | }] 14 | } 15 | 16 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/pkg/system/stat_openbsd.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import ( 4 | "syscall" 5 | ) 6 | 7 | // fromStatT creates a system.StatT type from a syscall.Stat_t type 8 | func fromStatT(s *syscall.Stat_t) (*StatT, error) { 9 | return &StatT{size: s.Size, 10 | mode: uint32(s.Mode), 11 | uid: s.Uid, 12 | gid: s.Gid, 13 | rdev: uint64(s.Rdev), 14 | mtim: s.Mtim}, nil 15 | } 16 | -------------------------------------------------------------------------------- /agent/vendor/github.com/pkg/errors/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/taskdefinitions/network-mode-windows/task-definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "ecsftest-networkmode", 3 | "networkMode": "$$$$NETWORK_MODE$$$$", 4 | "containerDefinitions": [{ 5 | "image": "microsoft/windowsservercore:latest", 6 | "entryPoint": ["powershell"], 7 | "command": ["sleep", "60"], 8 | "name": "network-$$$$NETWORK_MODE$$$$", 9 | "memory": 50 10 | }] 11 | } 12 | -------------------------------------------------------------------------------- /agent/vendor/github.com/Azure/go-ansiterm/utilities.go: -------------------------------------------------------------------------------- 1 | package ansiterm 2 | 3 | import ( 4 | "strconv" 5 | ) 6 | 7 | func sliceContains(bytes []byte, b byte) bool { 8 | for _, v := range bytes { 9 | if v == b { 10 | return true 11 | } 12 | } 13 | 14 | return false 15 | } 16 | 17 | func convertBytesToInteger(bytes []byte) int { 18 | s := string(bytes) 19 | i, _ := strconv.Atoi(s) 20 | return i 21 | } 22 | -------------------------------------------------------------------------------- /agent/vendor/github.com/gorilla/websocket/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | 24 | .idea/ 25 | *.iml -------------------------------------------------------------------------------- /agent/vendor/github.com/gorilla/websocket/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | 4 | matrix: 5 | include: 6 | - go: 1.4 7 | - go: 1.5 8 | - go: 1.6 9 | - go: 1.7 10 | - go: tip 11 | allow_failures: 12 | - go: tip 13 | 14 | script: 15 | - go get -t -v ./... 16 | - diff -u <(echo -n) <(gofmt -d .) 17 | - go vet $(go list ./... | grep -v /vendor/) 18 | - go test -v -race ./... 19 | -------------------------------------------------------------------------------- /agent/vendor/github.com/stretchr/testify/assert/errors.go: -------------------------------------------------------------------------------- 1 | package assert 2 | 3 | import ( 4 | "errors" 5 | ) 6 | 7 | // AnError is an error instance useful for testing. If the code does not care 8 | // about error specifics, and only needs to return the error for example, this 9 | // error should be used to make the test code more readable. 10 | var AnError = errors.New("assert.AnError general error for testing") 11 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/tools/imports/fastwalk_dirent_ino.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux,!appengine darwin 6 | 7 | package imports 8 | 9 | import "syscall" 10 | 11 | func direntInode(dirent *syscall.Dirent) uint64 { 12 | return uint64(dirent.Ino) 13 | } 14 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/taskdefinitions/hostname-windows/task-definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "ecsftest-hostname", 3 | "containerDefinitions": [{ 4 | "image": "microsoft/windowsservercore:latest", 5 | "name": "exit", 6 | "cpu": 10, 7 | "memory": 10, 8 | "hostname": "foobarbaz", 9 | "command": ["powershell", "-c", "if ((hostname) -eq \"foobarbaz\") { exit 42 } ; exit 1"] 10 | }] 11 | } 12 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/taskdefinitions/port-80-windows/task-definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "ecsftest-port-80-windows", 3 | "containerDefinitions": [{ 4 | "image": "amazon/amazon-ecs-listen80", 5 | "name": "sleep", 6 | "portBindings": [{ 7 | "containerPort": 80, 8 | "hostPort": 5180 9 | }], 10 | "memory": 50, 11 | "command": ["powershell", "\\listen80.exe"] 12 | }] 13 | } 14 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/taskdefinitions/telemetry/task-definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "ecs-metrics-test", 3 | "containerDefinitions": [{ 4 | "memory": 100, 5 | "name": "telemetry", 6 | "cpu": 100, 7 | "image": "127.0.0.1:51670/ubuntu:latest", 8 | "command": ["bash", "-c", "apt-get update; apt-get install stress; stress -m 1 --vm-bytes 84M --vm-keep;"] 9 | }] 10 | } 11 | -------------------------------------------------------------------------------- /agent/vendor/github.com/Sirupsen/logrus/terminal_linux.go: -------------------------------------------------------------------------------- 1 | // Based on ssh/terminal: 2 | // Copyright 2013 The Go Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style 4 | // license that can be found in the LICENSE file. 5 | 6 | // +build !appengine 7 | 8 | package logrus 9 | 10 | import "syscall" 11 | 12 | const ioctlReadTermios = syscall.TCGETS 13 | 14 | type Termios syscall.Termios 15 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/tools/imports/fastwalk_dirent_fileno.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build freebsd openbsd netbsd 6 | 7 | package imports 8 | 9 | import "syscall" 10 | 11 | func direntInode(dirent *syscall.Dirent) uint64 { 12 | return uint64(dirent.Fileno) 13 | } 14 | -------------------------------------------------------------------------------- /agent/vendor/github.com/jmespath/go-jmespath/api.go: -------------------------------------------------------------------------------- 1 | package jmespath 2 | 3 | // Search evaluates a JMESPath expression against input data and returns the result. 4 | func Search(expression string, data interface{}) (interface{}, error) { 5 | intr := newInterpreter() 6 | parser := NewParser() 7 | ast, err := parser.Parse(expression) 8 | if err != nil { 9 | return nil, err 10 | } 11 | return intr.Execute(ast, data) 12 | } 13 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/windows/env_unset.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows 6 | // +build go1.4 7 | 8 | package windows 9 | 10 | import "syscall" 11 | 12 | func Unsetenv(key string) error { 13 | // This was added in Go 1.4. 14 | return syscall.Unsetenv(key) 15 | } 16 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/taskdefinitions/busybox-port-5180/task-definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "ecsftest-busybox-port-5180", 3 | "containerDefinitions": [{ 4 | "image": "127.0.0.1:51670/busybox:latest", 5 | "name": "sleep", 6 | "portBindings": [{ 7 | "containerPort": 80, 8 | "hostPort": 5180 9 | }], 10 | "memory": 50, 11 | "command": ["sh", "-c", "echo foobar | nc -l -p 80"] 12 | }] 13 | } 14 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/taskdefinitions/dns-search-domains/task-definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "ecsftest-dns-search", 3 | "containerDefinitions": [{ 4 | "image": "busybox:latest", 5 | "name": "exit", 6 | "cpu": 10, 7 | "memory": 10, 8 | "dnsSearchDomains": ["search.example.com"], 9 | "command": ["sh", "-c", "egrep \"search\\s+search.example.com\" /etc/resolv.conf && exit 42 || exit 1"] 10 | }] 11 | } 12 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/taskdefinitions/memory-overcommit/task-definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "ecsftest-memory-overcommit", 3 | "containerDefinitions": [{ 4 | "image": "busybox:latest", 5 | "name": "memory-overcommit", 6 | "portBindings": [{ 7 | "containerPort": 80 8 | }], 9 | "command": ["sleep", "1m"], 10 | "memory": 200, 11 | "memoryReservation": $$$$MEMORY_RESERVATION$$$$ 12 | }] 13 | } 14 | -------------------------------------------------------------------------------- /agent/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error.go: -------------------------------------------------------------------------------- 1 | // +build !appengine 2 | 3 | package request 4 | 5 | import ( 6 | "net" 7 | "os" 8 | "syscall" 9 | ) 10 | 11 | func isErrConnectionReset(err error) bool { 12 | if opErr, ok := err.(*net.OpError); ok { 13 | if sysErr, ok := opErr.Err.(*os.SyscallError); ok { 14 | return sysErr.Err == syscall.ECONNRESET 15 | } 16 | } 17 | 18 | return false 19 | } 20 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/taskdefinitions/network-disabled/task-definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "ecsftest-network-disabled", 3 | "containerDefinitions": [{ 4 | "image": "busybox:latest", 5 | "name": "exit", 6 | "cpu": 10, 7 | "memory": 10, 8 | "disableNetworking": true, 9 | "command": ["sh", "-c", "[ -z \"$(ifconfig | grep \"inet addr\" | grep -v \"127\\.0\\.0\\.1\")\" ] && exit 42 || exit 1"] 10 | }] 11 | } 12 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/taskdefinitions/cleanup-windows/task-definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "ecsftest-cleanup-windows", 3 | "containerDefinitions": [{ 4 | "image": "microsoft/windowsservercore:latest", 5 | "name": "cleanup-windows", 6 | "cpu": 10, 7 | "memory": 10, 8 | "portBindings": [{ 9 | "containerPort": 80 10 | }], 11 | "entryPoint": ["powershell"], 12 | "command": ["sleep", "500"] 13 | }] 14 | } 15 | -------------------------------------------------------------------------------- /misc/certs/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:latest 2 | 3 | RUN apt-get update && \ 4 | apt-get install -y ca-certificates && \ 5 | rm -rf /var/lib/apt/lists/* 6 | 7 | # If anyone has a better idea for how to trim undesired certs or a better ca list to use, I'm all ears 8 | RUN cp /etc/ca-certificates.conf /tmp/caconf && cat /tmp/caconf | \ 9 | grep -v "mozilla/CNNIC_ROOT\.crt" > /etc/ca-certificates.conf && \ 10 | update-ca-certificates --fresh 11 | 12 | -------------------------------------------------------------------------------- /agent/vendor/github.com/golang/mock/AUTHORS: -------------------------------------------------------------------------------- 1 | # This is the official list of GoMock authors for copyright purposes. 2 | # This file is distinct from the CONTRIBUTORS files. 3 | # See the latter for an explanation. 4 | 5 | # Names should be added to this file as 6 | # Name or Organization 7 | # The email address is not required for organizations. 8 | 9 | # Please keep the list sorted. 10 | 11 | Alex Reece 12 | Google Inc. 13 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/taskdefinitions/extra-hosts/task-definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "ecsftest-extra-hosts", 3 | "containerDefinitions": [{ 4 | "image": "busybox:latest", 5 | "name": "exit", 6 | "cpu": 10, 7 | "memory": 10, 8 | "extraHosts": [{"hostname": "test.local", "ipAddress": "127.10.10.10"}], 9 | "command": ["sh", "-c", "egrep \"127\\.10\\.10\\.10\\s+test\\.local\" /etc/hosts && exit 42 || exit 1"] 10 | }] 11 | } 12 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/taskdefinitions/working-dir-windows/task-definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "ecsftest-working-dir-windows", 3 | "containerDefinitions": [{ 4 | "image": "microsoft/windowsservercore:latest", 5 | "name": "exit", 6 | "cpu": 10, 7 | "memory": 10, 8 | "workingDirectory": "C:/windows/system32", 9 | "command": ["powershell", "-c", "if ((pwd).Path -eq \"C:\\windows\\system32\") { exit 42 } ; exit 1"] 10 | }] 11 | } 12 | -------------------------------------------------------------------------------- /agent/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/uri_path.go: -------------------------------------------------------------------------------- 1 | // +build go1.5 2 | 3 | package v4 4 | 5 | import ( 6 | "net/url" 7 | "strings" 8 | ) 9 | 10 | func getURIPath(u *url.URL) string { 11 | var uri string 12 | 13 | if len(u.Opaque) > 0 { 14 | uri = "/" + strings.Join(strings.Split(u.Opaque, "/")[3:], "/") 15 | } else { 16 | uri = u.EscapedPath() 17 | } 18 | 19 | if len(uri) == 0 { 20 | uri = "/" 21 | } 22 | 23 | return uri 24 | } 25 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/taskdefinitions/labels-windows/task-definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "ecsftest-labels-windows", 3 | "containerDefinitions": [{ 4 | "image": "microsoft/windowsservercore:latest", 5 | "name": "labeled", 6 | "cpu": 10, 7 | "memory": 10, 8 | "dockerLabels": { 9 | "label1": "", 10 | "com.foo.label2": "value" 11 | }, 12 | "entryPoint": ["powershell"], 13 | "command": ["exit", "0"] 14 | }] 15 | } 16 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/pkg/system/xattrs_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package system 4 | 5 | // Lgetxattr is not supported on platforms other than linux. 6 | func Lgetxattr(path string, attr string) ([]byte, error) { 7 | return nil, ErrNotSupportedPlatform 8 | } 9 | 10 | // Lsetxattr is not supported on platforms other than linux. 11 | func Lsetxattr(path string, attr string, data []byte, flags int) error { 12 | return ErrNotSupportedPlatform 13 | } 14 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/windows/asm_windows_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // 6 | // System calls for 386, Windows are implemented in runtime/syscall_windows.goc 7 | // 8 | 9 | TEXT ·getprocaddress(SB), 7, $0-8 10 | JMP syscall·getprocaddress(SB) 11 | 12 | TEXT ·loadlibrary(SB), 7, $0-4 13 | JMP syscall·loadlibrary(SB) 14 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/windows/asm_windows_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // 6 | // System calls for amd64, Windows are implemented in runtime/syscall_windows.goc 7 | // 8 | 9 | TEXT ·getprocaddress(SB), 7, $0-32 10 | JMP syscall·getprocaddress(SB) 11 | 12 | TEXT ·loadlibrary(SB), 7, $0-8 13 | JMP syscall·loadlibrary(SB) 14 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/pkg/system/lstat.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package system 4 | 5 | import ( 6 | "syscall" 7 | ) 8 | 9 | // Lstat takes a path to a file and returns 10 | // a system.StatT type pertaining to that file. 11 | // 12 | // Throws an error if the file does not exist 13 | func Lstat(path string) (*StatT, error) { 14 | s := &syscall.Stat_t{} 15 | if err := syscall.Lstat(path, s); err != nil { 16 | return nil, err 17 | } 18 | return fromStatT(s) 19 | } 20 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/pkg/system/stat_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!windows,!freebsd,!solaris,!openbsd,!darwin 2 | 3 | package system 4 | 5 | import ( 6 | "syscall" 7 | ) 8 | 9 | // fromStatT creates a system.StatT type from a syscall.Stat_t type 10 | func fromStatT(s *syscall.Stat_t) (*StatT, error) { 11 | return &StatT{size: s.Size, 12 | mode: uint32(s.Mode), 13 | uid: s.Uid, 14 | gid: s.Gid, 15 | rdev: uint64(s.Rdev), 16 | mtim: s.Mtimespec}, nil 17 | } 18 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/unix/flock_linux_32bit.go: -------------------------------------------------------------------------------- 1 | // +build linux,386 linux,arm linux,mips linux,mipsle 2 | 3 | // Copyright 2014 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package unix 8 | 9 | func init() { 10 | // On 32-bit Linux systems, the fcntl syscall that matches Go's 11 | // Flock_t type is SYS_FCNTL64, not SYS_FCNTL. 12 | fcntl64Syscall = SYS_FCNTL64 13 | } 14 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/simpletests_unix/datavolume2.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "DataVolume2", 3 | "Description": "Verify that more complex datavolumes (including empty and volumes-from) work as expected; see Related", 4 | "TaskDefinition": "datavolume2", 5 | "Version": ">1.0.0", 6 | "Timeout": "2m", 7 | "ExitCodes": { 8 | "exit": 42 9 | }, 10 | "Related": ["https://forums.aws.amazon.com/thread.jspa?threadID=176057", "https://github.com/aws/amazon-ecs-agent/issues/52"] 11 | } 12 | -------------------------------------------------------------------------------- /agent/vendor/github.com/stretchr/testify/assert/forward_assertions.go: -------------------------------------------------------------------------------- 1 | package assert 2 | 3 | // Assertions provides assertion methods around the 4 | // TestingT interface. 5 | type Assertions struct { 6 | t TestingT 7 | } 8 | 9 | // New makes a new Assertions object for the specified TestingT. 10 | func New(t TestingT) *Assertions { 11 | return &Assertions{ 12 | t: t, 13 | } 14 | } 15 | 16 | //go:generate go run ../_codegen/main.go -output-package=assert -template=assertion_forward.go.tmpl 17 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/taskdefinitions/nofiles-ulimit/task-definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "ecsftest-ulimit-test", 3 | "containerDefinitions": [{ 4 | "image": "busybox:latest", 5 | "name": "exit", 6 | "cpu": 10, 7 | "memory": 10, 8 | "ulimits": [{"name":"nofile", "softLimit": 123, "hardLimit": 234}], 9 | "command": ["sh", "-c", "[ \"$(cat /proc/self/limits | grep \"^Max open files\" | awk '{print $4\" \"$5}')\" == \"123 234\" ] && exit 42 || exit 1"] 10 | }] 11 | } 12 | -------------------------------------------------------------------------------- /agent/vendor/github.com/stretchr/testify/require/forward_requirements.go: -------------------------------------------------------------------------------- 1 | package require 2 | 3 | // Assertions provides assertion methods around the 4 | // TestingT interface. 5 | type Assertions struct { 6 | t TestingT 7 | } 8 | 9 | // New makes a new Assertions object for the specified TestingT. 10 | func New(t TestingT) *Assertions { 11 | return &Assertions{ 12 | t: t, 13 | } 14 | } 15 | 16 | //go:generate go run ../_codegen/main.go -output-package=require -template=require_forward.go.tmpl 17 | -------------------------------------------------------------------------------- /agent/vendor/github.com/gorilla/websocket/conn_read.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Gorilla WebSocket Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.5 6 | 7 | package websocket 8 | 9 | import "io" 10 | 11 | func (c *Conn) read(n int) ([]byte, error) { 12 | p, err := c.br.Peek(n) 13 | if err == io.EOF { 14 | err = errUnexpectedEOF 15 | } 16 | c.br.Discard(len(p)) 17 | return p, err 18 | } 19 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/taskdefinitions/logdriver-jsonfile/task-definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "ecsinteg-json-file-rollover", 3 | "containerDefinitions": [{ 4 | "image": "busybox:latest", 5 | "name": "exit", 6 | "memory": 10, 7 | "cpu": 10, 8 | "logConfiguration": { 9 | "logDriver": "json-file", 10 | "options": { 11 | "max-file": "50", 12 | "max-size": "50k" 13 | } 14 | }, 15 | "command": ["sh", "-c", "echo helloworld"] 16 | }] 17 | } 18 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/pkg/system/meminfo.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | // MemInfo contains memory statistics of the host system. 4 | type MemInfo struct { 5 | // Total usable RAM (i.e. physical RAM minus a few reserved bits and the 6 | // kernel binary code). 7 | MemTotal int64 8 | 9 | // Amount of free memory. 10 | MemFree int64 11 | 12 | // Total amount of swap space available. 13 | SwapTotal int64 14 | 15 | // Amount of swap space that is currently unused. 16 | SwapFree int64 17 | } 18 | -------------------------------------------------------------------------------- /agent/vendor/github.com/aws/aws-sdk-go/aws/request/request_context_1_6.go: -------------------------------------------------------------------------------- 1 | // +build !go1.7 2 | 3 | package request 4 | 5 | import "github.com/aws/aws-sdk-go/aws" 6 | 7 | // setContext updates the Request to use the passed in context for cancellation. 8 | // Context will also be used for request retry delay. 9 | // 10 | // Creates shallow copy of the http.Request with the WithContext method. 11 | func setRequestContext(r *Request, ctx aws.Context) { 12 | r.context = ctx 13 | r.HTTPRequest.Cancel = ctx.Done() 14 | } 15 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/pkg/ioutils/temp_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package ioutils 4 | 5 | import ( 6 | "io/ioutil" 7 | 8 | "github.com/docker/docker/pkg/longpath" 9 | ) 10 | 11 | // TempDir is the equivalent of ioutil.TempDir, except that the result is in Windows longpath format. 12 | func TempDir(dir, prefix string) (string, error) { 13 | tempDir, err := ioutil.TempDir(dir, prefix) 14 | if err != nil { 15 | return "", err 16 | } 17 | return longpath.AddPrefix(tempDir), nil 18 | } 19 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/pkg/idtools/usergroupadd_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package idtools 4 | 5 | import "fmt" 6 | 7 | // AddNamespaceRangesUser takes a name and finds an unused uid, gid pair 8 | // and calls the appropriate helper function to add the group and then 9 | // the user to the group in /etc/group and /etc/passwd respectively. 10 | func AddNamespaceRangesUser(name string) (int, int, error) { 11 | return -1, -1, fmt.Errorf("No support for adding users or groups on this OS") 12 | } 13 | -------------------------------------------------------------------------------- /agent/vendor/github.com/aws/aws-sdk-go/aws/request/http_request.go: -------------------------------------------------------------------------------- 1 | package request 2 | 3 | import ( 4 | "io" 5 | "net/http" 6 | "net/url" 7 | ) 8 | 9 | func copyHTTPRequest(r *http.Request, body io.ReadCloser) *http.Request { 10 | req := new(http.Request) 11 | *req = *r 12 | req.URL = &url.URL{} 13 | *req.URL = *r.URL 14 | req.Body = body 15 | 16 | req.Header = http.Header{} 17 | for k, v := range r.Header { 18 | for _, vv := range v { 19 | req.Header.Add(k, vv) 20 | } 21 | } 22 | 23 | return req 24 | } 25 | -------------------------------------------------------------------------------- /agent/vendor/github.com/aws/aws-sdk-go/aws/request/request_context.go: -------------------------------------------------------------------------------- 1 | // +build go1.7 2 | 3 | package request 4 | 5 | import "github.com/aws/aws-sdk-go/aws" 6 | 7 | // setContext updates the Request to use the passed in context for cancellation. 8 | // Context will also be used for request retry delay. 9 | // 10 | // Creates shallow copy of the http.Request with the WithContext method. 11 | func setRequestContext(r *Request, ctx aws.Context) { 12 | r.context = ctx 13 | r.HTTPRequest = r.HTTPRequest.WithContext(ctx) 14 | } 15 | -------------------------------------------------------------------------------- /agent/vendor/github.com/vishvananda/netlink/neigh.go: -------------------------------------------------------------------------------- 1 | package netlink 2 | 3 | import ( 4 | "fmt" 5 | "net" 6 | ) 7 | 8 | // Neigh represents a link layer neighbor from netlink. 9 | type Neigh struct { 10 | LinkIndex int 11 | Family int 12 | State int 13 | Type int 14 | Flags int 15 | IP net.IP 16 | HardwareAddr net.HardwareAddr 17 | } 18 | 19 | // String returns $ip/$hwaddr $label 20 | func (neigh *Neigh) String() string { 21 | return fmt.Sprintf("%s %s", neigh.IP, neigh.HardwareAddr) 22 | } 23 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go 11 | // 12 | 13 | TEXT ·sysvicall6(SB),NOSPLIT,$0-64 14 | JMP syscall·sysvicall6(SB) 15 | 16 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-64 17 | JMP syscall·rawSysvicall6(SB) 18 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/taskdefinitions/iam-roles-windows/task-definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "ecsftest-iamrole-test", 3 | "taskRoleArn": "$$$TASK_ROLE$$$", 4 | "containerDefinitions": [{ 5 | "memory": 100, 6 | "cpu": 100, 7 | "name": "container-with-iamrole-windows", 8 | "image": "amazon/amazon-ecs-iamrolecontainer", 9 | "entryPoint": ["powershell"], 10 | "command": [".\\application.ps1; $env:AWS_REGION=\"$$$TEST_REGION$$$\";.\\ec2.exe; exit $LASTEXITCODE"] 11 | }] 12 | } 13 | -------------------------------------------------------------------------------- /agent/vendor/github.com/opencontainers/runc/libcontainer/user/lookup_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris 2 | 3 | package user 4 | 5 | import "io" 6 | 7 | func GetPasswdPath() (string, error) { 8 | return "", ErrUnsupported 9 | } 10 | 11 | func GetPasswd() (io.ReadCloser, error) { 12 | return nil, ErrUnsupported 13 | } 14 | 15 | func GetGroupPath() (string, error) { 16 | return "", ErrUnsupported 17 | } 18 | 19 | func GetGroup() (io.ReadCloser, error) { 20 | return nil, ErrUnsupported 21 | } 22 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/unix/gccgo_linux_sparc64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gccgo,linux,sparc64 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | //extern sysconf 12 | func realSysconf(name int) int64 13 | 14 | func sysconf(name int) (n int64, err syscall.Errno) { 15 | r := realSysconf(name) 16 | if r < 0 { 17 | return 0, syscall.GetErrno() 18 | } 19 | return r, 0 20 | } 21 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/taskdefinitions/network-link/task-definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "ecsinteg-network-link", 3 | "containerDefinitions": [{ 4 | "name": "nginx", 5 | "image": "127.0.0.1:51670/nginx:latest", 6 | "cpu": 20, 7 | "memory": 20, 8 | "essential": true 9 | }, { 10 | "name": "exit", 11 | "image": "127.0.0.1:51670/busybox:latest", 12 | "cpu": 10, 13 | "memory": 10, 14 | "links": ["nginx:nginx"], 15 | "command": ["sh", "-c", "sleep 1; wget -O- http://nginx && exit 42; exit -1"] 16 | }] 17 | } 18 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/pkg/system/filesys.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package system 4 | 5 | import ( 6 | "os" 7 | "path/filepath" 8 | ) 9 | 10 | // MkdirAll creates a directory named path along with any necessary parents, 11 | // with permission specified by attribute perm for all dir created. 12 | func MkdirAll(path string, perm os.FileMode) error { 13 | return os.MkdirAll(path, perm) 14 | } 15 | 16 | // IsAbs is a platform-specific wrapper for filepath.IsAbs. 17 | func IsAbs(path string) bool { 18 | return filepath.IsAbs(path) 19 | } 20 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/taskdefinitions/iam-roles/task-definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "ecsftest-iamrole-test", 3 | "taskRoleArn": "$$$TASK_ROLE$$$", 4 | "networkMode": "$$$NETWORK_MODE$$$", 5 | "containerDefinitions": [{ 6 | "memory": 100, 7 | "cpu": 100, 8 | "name": "container-with-iamrole", 9 | "image": "127.0.0.1:51670/amazon/awscli:latest", 10 | "entryPoint": ["sh", "-c"], 11 | "command": ["sleep 5s; export AWS_DEFAULT_REGION=$$$TEST_REGION$$$; aws ec2 describe-regions"] 12 | }] 13 | } 14 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/taskdefinitions/logdriver-jsonfile-windows/task-definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "ecsinteg-json-file-rollover", 3 | "containerDefinitions": [{ 4 | "image": "microsoft/windowsservercore:latest", 5 | "name": "exit", 6 | "memory": 10, 7 | "cpu": 10, 8 | "logConfiguration": { 9 | "logDriver": "json-file", 10 | "options": { 11 | "max-file": "50", 12 | "max-size": "50k" 13 | } 14 | }, 15 | "entryPoint": ["powershell"], 16 | "command": ["echo", "helloworld"] 17 | }] 18 | } 19 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/pkg/system/syscall_unix.go: -------------------------------------------------------------------------------- 1 | // +build linux freebsd 2 | 3 | package system 4 | 5 | import "syscall" 6 | 7 | // Unmount is a platform-specific helper function to call 8 | // the unmount syscall. 9 | func Unmount(dest string) error { 10 | return syscall.Unmount(dest, 0) 11 | } 12 | 13 | // CommandLineToArgv should not be used on Unix. 14 | // It simply returns commandLine in the only element in the returned array. 15 | func CommandLineToArgv(commandLine string) ([]string, error) { 16 | return []string{commandLine}, nil 17 | } 18 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gccgo,linux,amd64 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | //extern gettimeofday 12 | func realGettimeofday(*Timeval, *byte) int32 13 | 14 | func gettimeofday(tv *Timeval) (err syscall.Errno) { 15 | r := realGettimeofday(tv, nil) 16 | if r < 0 { 17 | return syscall.GetErrno() 18 | } 19 | return 0 20 | } 21 | -------------------------------------------------------------------------------- /agent/engine/testdata/load.go: -------------------------------------------------------------------------------- 1 | package testdata 2 | 3 | import ( 4 | "encoding/json" 5 | "io/ioutil" 6 | "path/filepath" 7 | "runtime" 8 | 9 | "github.com/aws/amazon-ecs-agent/agent/api" 10 | ) 11 | 12 | func LoadTask(name string) *api.Task { 13 | _, filename, _, _ := runtime.Caller(0) 14 | filedata, err := ioutil.ReadFile(filepath.Join(filepath.Dir(filename), "test_tasks", name+".json")) 15 | if err != nil { 16 | panic(err) 17 | } 18 | t := &api.Task{} 19 | if err := json.Unmarshal(filedata, t); err != nil { 20 | panic(err) 21 | } 22 | return t 23 | } 24 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/pkg/term/tc_other.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | // +build !linux !cgo 3 | // +build !solaris !cgo 4 | 5 | package term 6 | 7 | import ( 8 | "syscall" 9 | "unsafe" 10 | ) 11 | 12 | func tcget(fd uintptr, p *Termios) syscall.Errno { 13 | _, _, err := syscall.Syscall(syscall.SYS_IOCTL, fd, uintptr(getTermios), uintptr(unsafe.Pointer(p))) 14 | return err 15 | } 16 | 17 | func tcset(fd uintptr, p *Termios) syscall.Errno { 18 | _, _, err := syscall.Syscall(syscall.SYS_IOCTL, fd, setTermios, uintptr(unsafe.Pointer(p))) 19 | return err 20 | } 21 | -------------------------------------------------------------------------------- /agent/vendor/github.com/Azure/go-ansiterm/ground_state.go: -------------------------------------------------------------------------------- 1 | package ansiterm 2 | 3 | type groundState struct { 4 | baseState 5 | } 6 | 7 | func (gs groundState) Handle(b byte) (s state, e error) { 8 | gs.parser.context.currentChar = b 9 | 10 | nextState, err := gs.baseState.Handle(b) 11 | if nextState != nil || err != nil { 12 | return nextState, err 13 | } 14 | 15 | switch { 16 | case sliceContains(printables, b): 17 | return gs, gs.parser.print() 18 | 19 | case sliceContains(executors, b): 20 | return gs, gs.parser.execute() 21 | } 22 | 23 | return gs, nil 24 | } 25 | -------------------------------------------------------------------------------- /agent/vendor/github.com/gorilla/websocket/conn_read_legacy.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Gorilla WebSocket Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !go1.5 6 | 7 | package websocket 8 | 9 | import "io" 10 | 11 | func (c *Conn) read(n int) ([]byte, error) { 12 | p, err := c.br.Peek(n) 13 | if err == io.EOF { 14 | err = errUnexpectedEOF 15 | } 16 | if len(p) > 0 { 17 | // advance over the bytes just read 18 | io.ReadFull(c.br, p) 19 | } 20 | return p, err 21 | } 22 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/pkg/ioutils/fmt.go: -------------------------------------------------------------------------------- 1 | package ioutils 2 | 3 | import ( 4 | "fmt" 5 | "io" 6 | ) 7 | 8 | // FprintfIfNotEmpty prints the string value if it's not empty 9 | func FprintfIfNotEmpty(w io.Writer, format, value string) (int, error) { 10 | if value != "" { 11 | return fmt.Fprintf(w, format, value) 12 | } 13 | return 0, nil 14 | } 15 | 16 | // FprintfIfTrue prints the boolean value if it's true 17 | func FprintfIfTrue(w io.Writer, format string, ok bool) (int, error) { 18 | if ok { 19 | return fmt.Fprintf(w, format, ok) 20 | } 21 | return 0, nil 22 | } 23 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/pkg/fileutils/fileutils_unix.go: -------------------------------------------------------------------------------- 1 | // +build linux freebsd 2 | 3 | package fileutils 4 | 5 | import ( 6 | "fmt" 7 | "io/ioutil" 8 | "os" 9 | 10 | "github.com/Sirupsen/logrus" 11 | ) 12 | 13 | // GetTotalUsedFds Returns the number of used File Descriptors by 14 | // reading it via /proc filesystem. 15 | func GetTotalUsedFds() int { 16 | if fds, err := ioutil.ReadDir(fmt.Sprintf("/proc/%d/fd", os.Getpid())); err != nil { 17 | logrus.Errorf("Error opening /proc/%d/fd: %s", os.Getpid(), err) 18 | } else { 19 | return len(fds) 20 | } 21 | return -1 22 | } 23 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/windows/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows,!race 6 | 7 | package windows 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/taskdefinitions/add-drop-capabilities/task-definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "ecsftest-add-drop-capabilities", 3 | "containerDefinitions": [{ 4 | "image": "127.0.0.1:51670/ubuntu:latest", 5 | "name": "exit", 6 | "cpu": 10, 7 | "memory": 10, 8 | "linuxParameters": { 9 | "capabilities": { 10 | "add": ["SYS_ADMIN"], 11 | "drop": ["MKNOD"] 12 | } 13 | }, 14 | "command": ["sh", "-c", "if capsh --print | grep -q \"cap_sys_admin\" && ! capsh --print | grep -q \"cap_mknod\"; then exit 42; else exit 1; fi"] 15 | }] 16 | } 17 | -------------------------------------------------------------------------------- /agent/vendor/github.com/opencontainers/runc/libcontainer/system/sysconfig_notcgo.go: -------------------------------------------------------------------------------- 1 | // +build !cgo windows 2 | 3 | package system 4 | 5 | func GetClockTicks() int { 6 | // TODO figure out a better alternative for platforms where we're missing cgo 7 | // 8 | // TODO Windows. This could be implemented using Win32 QueryPerformanceFrequency(). 9 | // https://msdn.microsoft.com/en-us/library/windows/desktop/ms644905(v=vs.85).aspx 10 | // 11 | // An example of its usage can be found here. 12 | // https://msdn.microsoft.com/en-us/library/windows/desktop/dn553408(v=vs.85).aspx 13 | 14 | return 100 15 | } 16 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/go-units/README.md: -------------------------------------------------------------------------------- 1 | [![GoDoc](https://godoc.org/github.com/docker/go-units?status.svg)](https://godoc.org/github.com/docker/go-units) 2 | 3 | # Introduction 4 | 5 | go-units is a library to transform human friendly measurements into machine friendly values. 6 | 7 | ## Usage 8 | 9 | See the [docs in godoc](https://godoc.org/github.com/docker/go-units) for examples and documentation. 10 | 11 | ## Copyright and license 12 | 13 | Copyright © 2015 Docker, Inc. 14 | 15 | go-units is licensed under the Apache License, Version 2.0. 16 | See [LICENSE](LICENSE) for the full text of the license. 17 | -------------------------------------------------------------------------------- /agent/vendor/github.com/aws/aws-sdk-go/aws/errors.go: -------------------------------------------------------------------------------- 1 | package aws 2 | 3 | import "github.com/aws/aws-sdk-go/aws/awserr" 4 | 5 | var ( 6 | // ErrMissingRegion is an error that is returned if region configuration is 7 | // not found. 8 | // 9 | // @readonly 10 | ErrMissingRegion = awserr.New("MissingRegion", "could not find region configuration", nil) 11 | 12 | // ErrMissingEndpoint is an error that is returned if an endpoint cannot be 13 | // resolved for a service. 14 | // 15 | // @readonly 16 | ErrMissingEndpoint = awserr.New("MissingEndpoint", "'Endpoint' configuration is required for this service", nil) 17 | ) 18 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/pkg/system/path_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package system 4 | 5 | // DefaultPathEnv is unix style list of directories to search for 6 | // executables. Each directory is separated from the next by a colon 7 | // ':' character . 8 | const DefaultPathEnv = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" 9 | 10 | // CheckSystemDriveAndRemoveDriveLetter verifies that a path, if it includes a drive letter, 11 | // is the system drive. This is a no-op on Linux. 12 | func CheckSystemDriveAndRemoveDriveLetter(path string) (string, error) { 13 | return path, nil 14 | } 15 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/windows/ztypes_windows_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | Description [WSADESCRIPTION_LEN + 1]byte 11 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 12 | MaxSockets uint16 13 | MaxUdpDg uint16 14 | VendorInfo *byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Port uint16 21 | Proto *byte 22 | } 23 | -------------------------------------------------------------------------------- /agent/vendor/github.com/vishvananda/netlink/socket.go: -------------------------------------------------------------------------------- 1 | package netlink 2 | 3 | import "net" 4 | 5 | // SocketID identifies a single socket. 6 | type SocketID struct { 7 | SourcePort uint16 8 | DestinationPort uint16 9 | Source net.IP 10 | Destination net.IP 11 | Interface uint32 12 | Cookie [2]uint32 13 | } 14 | 15 | // Socket represents a netlink socket. 16 | type Socket struct { 17 | Family uint8 18 | State uint8 19 | Timer uint8 20 | Retrans uint8 21 | ID SocketID 22 | Expires uint32 23 | RQueue uint32 24 | WQueue uint32 25 | UID uint32 26 | INode uint32 27 | } 28 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/windows/ztypes_windows_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | MaxSockets uint16 11 | MaxUdpDg uint16 12 | VendorInfo *byte 13 | Description [WSADESCRIPTION_LEN + 1]byte 14 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Proto *byte 21 | Port uint16 22 | } 23 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/taskdefinitions/awslogs/task-definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "ecs-awslogs-test", 3 | "containerDefinitions": [{ 4 | "essential": true, 5 | "memory": 10, 6 | "name": "awslogs", 7 | "cpu": 10, 8 | "image": "busybox:latest", 9 | "logConfiguration": { 10 | "logDriver": "awslogs", 11 | "options": { 12 | "awslogs-group":"ecs-functional-tests", 13 | "awslogs-region":"$$$TEST_REGION$$$", 14 | "awslogs-stream-prefix":"ecs-functional-tests" 15 | } 16 | }, 17 | "command": ["sh", "-c", "echo hello world"] 18 | }] 19 | } 20 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/pkg/fileutils/fileutils_darwin.go: -------------------------------------------------------------------------------- 1 | package fileutils 2 | 3 | import ( 4 | "os" 5 | "os/exec" 6 | "strconv" 7 | "strings" 8 | ) 9 | 10 | // GetTotalUsedFds returns the number of used File Descriptors by 11 | // executing `lsof -p PID` 12 | func GetTotalUsedFds() int { 13 | pid := os.Getpid() 14 | 15 | cmd := exec.Command("lsof", "-p", strconv.Itoa(pid)) 16 | 17 | output, err := cmd.CombinedOutput() 18 | if err != nil { 19 | return -1 20 | } 21 | 22 | outputStr := strings.TrimSpace(string(output)) 23 | 24 | fds := strings.Split(outputStr, "\n") 25 | 26 | return len(fds) - 1 27 | } 28 | -------------------------------------------------------------------------------- /agent/vendor/github.com/opencontainers/runc/NOTICE: -------------------------------------------------------------------------------- 1 | runc 2 | 3 | Copyright 2012-2015 Docker, Inc. 4 | 5 | This product includes software developed at Docker, Inc. (http://www.docker.com). 6 | 7 | The following is courtesy of our legal counsel: 8 | 9 | 10 | Use and transfer of Docker may be subject to certain restrictions by the 11 | United States and other governments. 12 | It is your responsibility to ensure that your use and/or transfer does not 13 | violate applicable laws. 14 | 15 | For more information, please see http://www.bis.doc.gov 16 | 17 | See also http://www.apache.org/dev/crypto.html and/or seek legal counsel. 18 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/windows/str.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows 6 | 7 | package windows 8 | 9 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency 10 | if val < 0 { 11 | return "-" + itoa(-val) 12 | } 13 | var buf [32]byte // big enough for int64 14 | i := len(buf) - 1 15 | for val >= 10 { 16 | buf[i] = byte(val%10 + '0') 17 | i-- 18 | val /= 10 19 | } 20 | buf[i] = byte(val + '0') 21 | return string(buf[i:]) 22 | } 23 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/windows/env_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Windows environment variables. 6 | 7 | package windows 8 | 9 | import "syscall" 10 | 11 | func Getenv(key string) (value string, found bool) { 12 | return syscall.Getenv(key) 13 | } 14 | 15 | func Setenv(key, value string) error { 16 | return syscall.Setenv(key, value) 17 | } 18 | 19 | func Clearenv() { 20 | syscall.Clearenv() 21 | } 22 | 23 | func Environ() []string { 24 | return syscall.Environ() 25 | } 26 | -------------------------------------------------------------------------------- /agent/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator.go: -------------------------------------------------------------------------------- 1 | package corehandlers 2 | 3 | import "github.com/aws/aws-sdk-go/aws/request" 4 | 5 | // ValidateParametersHandler is a request handler to validate the input parameters. 6 | // Validating parameters only has meaning if done prior to the request being sent. 7 | var ValidateParametersHandler = request.NamedHandler{Name: "core.ValidateParametersHandler", Fn: func(r *request.Request) { 8 | if !r.ParamsFilled() { 9 | return 10 | } 11 | 12 | if v, ok := r.Params.(request.Validator); ok { 13 | if err := v.Validate(); err != nil { 14 | r.Error = err 15 | } 16 | } 17 | }} 18 | -------------------------------------------------------------------------------- /agent/vendor/github.com/deniswernert/udev/modalias.go: -------------------------------------------------------------------------------- 1 | package udev 2 | 3 | import ( 4 | "errors" 5 | "strings" 6 | ) 7 | 8 | // ModAlias abstracts a MODALIAS identifier string 9 | type ModAlias struct { 10 | Type string 11 | Value string 12 | } 13 | 14 | // ParseModAlias parses a MODALIAS identifier 15 | func ParseModAlias(input string) (*ModAlias, error) { 16 | bits := strings.SplitN(input, ":", 2) 17 | if len(bits) != 2 { 18 | return nil, errors.New("Invalid string prefix") 19 | } 20 | 21 | modalias := &ModAlias{ 22 | Type: bits[0], 23 | Value: bits[1], 24 | } 25 | 26 | return modalias, nil 27 | } 28 | -------------------------------------------------------------------------------- /agent/vendor/github.com/jmespath/go-jmespath/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2015 James Saryerwinnie 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/unix/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin,!race linux,!race freebsd,!race netbsd openbsd solaris dragonfly 6 | 7 | package unix 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /scripts/update-version: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | version=${1:?Must specify version as the only argument (e.g. 1.0.0)} 5 | 6 | # Normalize to working directory being build root (up one level from ./scripts) 7 | ROOT=$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd ) 8 | cd "${ROOT}" 9 | 10 | source ./scripts/shared_env 11 | 12 | echo -n "$version" > VERSION 13 | export ECS_UNKNOWN_VERSION=true 14 | 15 | cd ./agent/version/ 16 | go run gen/version-gen.go 17 | cd "${ROOT}" 18 | 19 | git add agent/version/version.go VERSION 20 | 21 | # TODO, the changelog bump could also be automated 22 | echo "Please edit the changelog and commit the version bump" 23 | -------------------------------------------------------------------------------- /agent/vendor/github.com/fsouza/go-dockerclient/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: '{build}' 2 | platform: x64 3 | clone_depth: 2 4 | clone_folder: c:\gopath\src\github.com\fsouza\go-dockerclient 5 | environment: 6 | GOPATH: c:\gopath 7 | matrix: 8 | - GOVERSION: 1.7.5 9 | - GOVERSION: 1.8.1 10 | install: 11 | - set PATH=%GOPATH%\bin;c:\go\bin;%PATH% 12 | - rmdir c:\go /s /q 13 | - appveyor DownloadFile https://storage.googleapis.com/golang/go%GOVERSION%.windows-amd64.zip 14 | - 7z x go%GOVERSION%.windows-amd64.zip -y -oC:\ > NUL 15 | build_script: 16 | - go get -d -t ./... 17 | test_script: 18 | - go test -v ./... 19 | matrix: 20 | fast_finish: true 21 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/api/types/swarm/common.go: -------------------------------------------------------------------------------- 1 | package swarm 2 | 3 | import "time" 4 | 5 | // Version represents the internal object version. 6 | type Version struct { 7 | Index uint64 `json:",omitempty"` 8 | } 9 | 10 | // Meta is a base object inherited by most of the other once. 11 | type Meta struct { 12 | Version Version `json:",omitempty"` 13 | CreatedAt time.Time `json:",omitempty"` 14 | UpdatedAt time.Time `json:",omitempty"` 15 | } 16 | 17 | // Annotations represents how to describe an object. 18 | type Annotations struct { 19 | Name string `json:",omitempty"` 20 | Labels map[string]string `json:",omitempty"` 21 | } 22 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | version: '{build}' 2 | platform: x64 3 | clone_depth: 2 4 | clone_folder: c:\gopath\src\github.com\aws\amazon-ecs-agent 5 | environment: 6 | GOPATH: c:\gopath 7 | GOVERSION: 1.7.4 8 | install: 9 | - set PATH=%GOPATH%\bin;c:\go\bin;%PATH% 10 | - rmdir c:\go /s /q 11 | - appveyor DownloadFile https://storage.googleapis.com/golang/go%GOVERSION%.windows-amd64.zip 12 | - 7z x go%GOVERSION%.windows-amd64.zip -y -oC:\ > NUL 13 | build_script: 14 | - go build ./agent 15 | test_script: 16 | - for /f "" %%G in ('go list github.com/aws/amazon-ecs-agent/agent/... ^| find /i /v "/vendor/"') do ( go test -race -timeout 40s %%G & IF ERRORLEVEL == 1 EXIT 1) 17 | -------------------------------------------------------------------------------- /agent/vendor/github.com/opencontainers/runc/libcontainer/system/syscall_linux_386.go: -------------------------------------------------------------------------------- 1 | // +build linux,386 2 | 3 | package system 4 | 5 | import ( 6 | "syscall" 7 | ) 8 | 9 | // Setuid sets the uid of the calling thread to the specified uid. 10 | func Setuid(uid int) (err error) { 11 | _, _, e1 := syscall.RawSyscall(syscall.SYS_SETUID32, uintptr(uid), 0, 0) 12 | if e1 != 0 { 13 | err = e1 14 | } 15 | return 16 | } 17 | 18 | // Setgid sets the gid of the calling thread to the specified gid. 19 | func Setgid(gid int) (err error) { 20 | _, _, e1 := syscall.RawSyscall(syscall.SYS_SETGID32, uintptr(gid), 0, 0) 21 | if e1 != 0 { 22 | err = e1 23 | } 24 | return 25 | } 26 | -------------------------------------------------------------------------------- /agent/vendor/github.com/opencontainers/runc/libcontainer/system/syscall_linux_arm.go: -------------------------------------------------------------------------------- 1 | // +build linux,arm 2 | 3 | package system 4 | 5 | import ( 6 | "syscall" 7 | ) 8 | 9 | // Setuid sets the uid of the calling thread to the specified uid. 10 | func Setuid(uid int) (err error) { 11 | _, _, e1 := syscall.RawSyscall(syscall.SYS_SETUID32, uintptr(uid), 0, 0) 12 | if e1 != 0 { 13 | err = e1 14 | } 15 | return 16 | } 17 | 18 | // Setgid sets the gid of the calling thread to the specified gid. 19 | func Setgid(gid int) (err error) { 20 | _, _, e1 := syscall.RawSyscall(syscall.SYS_SETGID32, uintptr(gid), 0, 0) 21 | if e1 != 0 { 22 | err = e1 23 | } 24 | return 25 | } 26 | -------------------------------------------------------------------------------- /agent/statemanager/dependencies/noop.go: -------------------------------------------------------------------------------- 1 | package dependencies 2 | 3 | // Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"). You may 6 | // not use this file except in compliance with the License. A copy of the 7 | // License is located at 8 | // 9 | // http://aws.amazon.com/apache2.0/ 10 | // 11 | // or in the "license" file accompanying this file. This file is distributed 12 | // on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 | // express or implied. See the License for the specific language governing 14 | // permissions and limitations under the License. 15 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/taskdefinitions/awslogs-windows/task-definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "ecs-awslogs-test", 3 | "containerDefinitions": [{ 4 | "essential": true, 5 | "memory": 10, 6 | "name": "awslogs", 7 | "cpu": 10, 8 | "image": "microsoft/windowsservercore:latest", 9 | "logConfiguration": { 10 | "logDriver": "awslogs", 11 | "options": { 12 | "awslogs-group":"ecs-functional-tests", 13 | "awslogs-region":"$$$TEST_REGION$$$", 14 | "awslogs-stream-prefix":"ecs-functional-tests" 15 | } 16 | }, 17 | "entryPoint": ["powershell"], 18 | "command": ["echo", "helloworld"] 19 | }] 20 | } 21 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/unix/env_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | // Unix environment variables. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getenv(key string) (value string, found bool) { 14 | return syscall.Getenv(key) 15 | } 16 | 17 | func Setenv(key, value string) error { 18 | return syscall.Setenv(key, value) 19 | } 20 | 21 | func Clearenv() { 22 | syscall.Clearenv() 23 | } 24 | 25 | func Environ() []string { 26 | return syscall.Environ() 27 | } 28 | -------------------------------------------------------------------------------- /agent/engine/generate_mocks.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | // not use this file except in compliance with the License. A copy of the 5 | // License is located at 6 | // 7 | // http://aws.amazon.com/apache2.0/ 8 | // 9 | // or in the "license" file accompanying this file. This file is distributed 10 | // on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | // express or implied. See the License for the specific language governing 12 | // permissions and limitations under the License. 13 | 14 | package engine 15 | 16 | //go:generate mockgen_engine.sh 17 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/unix/syscall_unix_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | // +build !gccgo 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 13 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 14 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 15 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 16 | -------------------------------------------------------------------------------- /agent/api/const_linux.go: -------------------------------------------------------------------------------- 1 | // +build linux 2 | 3 | // Copyright 2014-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"). You may 6 | // not use this file except in compliance with the License. A copy of the 7 | // License is located at 8 | // 9 | // http://aws.amazon.com/apache2.0/ 10 | // 11 | // or in the "license" file accompanying this file. This file is distributed 12 | // on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 | // express or implied. See the License for the specific language governing 14 | // permissions and limitations under the License. 15 | 16 | package api 17 | 18 | const OSType = "linux" 19 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/pkg/system/lstat_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package system 4 | 5 | import ( 6 | "os" 7 | ) 8 | 9 | // Lstat calls os.Lstat to get a fileinfo interface back. 10 | // This is then copied into our own locally defined structure. 11 | // Note the Linux version uses fromStatT to do the copy back, 12 | // but that not strictly necessary when already in an OS specific module. 13 | func Lstat(path string) (*StatT, error) { 14 | fi, err := os.Lstat(path) 15 | if err != nil { 16 | return nil, err 17 | } 18 | 19 | return &StatT{ 20 | name: fi.Name(), 21 | size: fi.Size(), 22 | mode: fi.Mode(), 23 | modTime: fi.ModTime(), 24 | isDir: fi.IsDir()}, nil 25 | } 26 | -------------------------------------------------------------------------------- /agent/vendor/github.com/vishvananda/netlink/order.go: -------------------------------------------------------------------------------- 1 | package netlink 2 | 3 | import ( 4 | "encoding/binary" 5 | 6 | "github.com/vishvananda/netlink/nl" 7 | ) 8 | 9 | var ( 10 | native = nl.NativeEndian() 11 | networkOrder = binary.BigEndian 12 | ) 13 | 14 | func htonl(val uint32) []byte { 15 | bytes := make([]byte, 4) 16 | binary.BigEndian.PutUint32(bytes, val) 17 | return bytes 18 | } 19 | 20 | func htons(val uint16) []byte { 21 | bytes := make([]byte, 2) 22 | binary.BigEndian.PutUint16(bytes, val) 23 | return bytes 24 | } 25 | 26 | func ntohl(buf []byte) uint32 { 27 | return binary.BigEndian.Uint32(buf) 28 | } 29 | 30 | func ntohs(buf []byte) uint16 { 31 | return binary.BigEndian.Uint16(buf) 32 | } 33 | -------------------------------------------------------------------------------- /agent/api/const_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | // Copyright 2014-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"). You may 6 | // not use this file except in compliance with the License. A copy of the 7 | // License is located at 8 | // 9 | // http://aws.amazon.com/apache2.0/ 10 | // 11 | // or in the "license" file accompanying this file. This file is distributed 12 | // on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 | // express or implied. See the License for the specific language governing 14 | // permissions and limitations under the License. 15 | 16 | package api 17 | 18 | const OSType = "windows" 19 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/pkg/system/utimes_freebsd.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import ( 4 | "syscall" 5 | "unsafe" 6 | ) 7 | 8 | // LUtimesNano is used to change access and modification time of the specified path. 9 | // It's used for symbol link file because syscall.UtimesNano doesn't support a NOFOLLOW flag atm. 10 | func LUtimesNano(path string, ts []syscall.Timespec) error { 11 | var _path *byte 12 | _path, err := syscall.BytePtrFromString(path) 13 | if err != nil { 14 | return err 15 | } 16 | 17 | if _, _, err := syscall.Syscall(syscall.SYS_LUTIMES, uintptr(unsafe.Pointer(_path)), uintptr(unsafe.Pointer(&ts[0])), 0); err != 0 && err != syscall.ENOSYS { 18 | return err 19 | } 20 | 21 | return nil 22 | } 23 | -------------------------------------------------------------------------------- /agent/vendor/github.com/opencontainers/runc/libcontainer/system/syscall_linux_64.go: -------------------------------------------------------------------------------- 1 | // +build linux,arm64 linux,amd64 linux,ppc linux,ppc64 linux,ppc64le linux,s390x 2 | 3 | package system 4 | 5 | import ( 6 | "syscall" 7 | ) 8 | 9 | // Setuid sets the uid of the calling thread to the specified uid. 10 | func Setuid(uid int) (err error) { 11 | _, _, e1 := syscall.RawSyscall(syscall.SYS_SETUID, uintptr(uid), 0, 0) 12 | if e1 != 0 { 13 | err = e1 14 | } 15 | return 16 | } 17 | 18 | // Setgid sets the gid of the calling thread to the specified gid. 19 | func Setgid(gid int) (err error) { 20 | _, _, e1 := syscall.RawSyscall(syscall.SYS_SETGID, uintptr(gid), 0, 0) 21 | if e1 != 0 { 22 | err = e1 23 | } 24 | return 25 | } 26 | -------------------------------------------------------------------------------- /agent/vendor/github.com/opencontainers/runc/libcontainer/user/lookup_unix.go: -------------------------------------------------------------------------------- 1 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 2 | 3 | package user 4 | 5 | import ( 6 | "io" 7 | "os" 8 | ) 9 | 10 | // Unix-specific path to the passwd and group formatted files. 11 | const ( 12 | unixPasswdPath = "/etc/passwd" 13 | unixGroupPath = "/etc/group" 14 | ) 15 | 16 | func GetPasswdPath() (string, error) { 17 | return unixPasswdPath, nil 18 | } 19 | 20 | func GetPasswd() (io.ReadCloser, error) { 21 | return os.Open(unixPasswdPath) 22 | } 23 | 24 | func GetGroupPath() (string, error) { 25 | return unixGroupPath, nil 26 | } 27 | 28 | func GetGroup() (io.ReadCloser, error) { 29 | return os.Open(unixGroupPath) 30 | } 31 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/unix/asm_linux_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux 6 | // +build arm64 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-56 15 | B syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 18 | B syscall·Syscall6(SB) 19 | 20 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 21 | B syscall·RawSyscall(SB) 22 | 23 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 24 | B syscall·RawSyscall6(SB) 25 | -------------------------------------------------------------------------------- /misc/windows-listen80/listen80.dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2014-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | # not use this file except in compliance with the License. A copy of the 5 | # License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is distributed 10 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | # express or implied. See the License for the specific language governing 12 | # permissions and limitations under the License. 13 | 14 | FROM microsoft/windowsservercore:latest 15 | ADD listen80.exe listen80.exe 16 | -------------------------------------------------------------------------------- /agent/api/const_unknown.go: -------------------------------------------------------------------------------- 1 | // +build !windows,!linux 2 | 3 | // Copyright 2014-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"). You may 6 | // not use this file except in compliance with the License. A copy of the 7 | // License is located at 8 | // 9 | // http://aws.amazon.com/apache2.0/ 10 | // 11 | // or in the "license" file accompanying this file. This file is distributed 12 | // on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 | // express or implied. See the License for the specific language governing 14 | // permissions and limitations under the License. 15 | 16 | package api 17 | 18 | const OSType = "unknown" 19 | -------------------------------------------------------------------------------- /agent/vendor/github.com/Sirupsen/logrus/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package logrus is a structured logger for Go, completely API compatible with the standard library logger. 3 | 4 | 5 | The simplest way to use Logrus is simply the package-level exported logger: 6 | 7 | package main 8 | 9 | import ( 10 | log "github.com/Sirupsen/logrus" 11 | ) 12 | 13 | func main() { 14 | log.WithFields(log.Fields{ 15 | "animal": "walrus", 16 | "number": 1, 17 | "size": 10, 18 | }).Info("A walrus appears") 19 | } 20 | 21 | Output: 22 | time="2015-09-07T08:48:33Z" level=info msg="A walrus appears" animal=walrus number=1 size=10 23 | 24 | For a full guide visit https://github.com/Sirupsen/logrus 25 | */ 26 | package logrus 27 | -------------------------------------------------------------------------------- /agent/config/interface.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | // not use this file except in compliance with the License. A copy of the 5 | // License is located at 6 | // 7 | // http://aws.amazon.com/apache2.0/ 8 | // 9 | // or in the "license" file accompanying this file. This file is distributed 10 | // on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | // express or implied. See the License for the specific language governing 12 | // permissions and limitations under the License. 13 | 14 | package config 15 | 16 | type ConfigReader interface { 17 | ReadConfig() *Config 18 | } 19 | -------------------------------------------------------------------------------- /agent/engine/testdata/test_tasks/circular_dependency.json: -------------------------------------------------------------------------------- 1 | { 2 | "Arn":"arn:aws:ecs:us-west-2:123456789012:task/12345678-90ab-cdef-1234-56780abcdef1-circular-dependency", 3 | "Family":"circular-dependency", 4 | "Version":"2", 5 | "Containers": 6 | [{ 7 | "Name": "web", 8 | "Image": "busybox", 9 | "Command": ["sleep", "1000"], 10 | "Links":["web-db:web-db"] 11 | }, 12 | { 13 | "Name": "web-db", 14 | "Image": "busybox", 15 | "Command": ["sleep", "1000"], 16 | "volumesFrom": [{ 17 | "sourceContainer": "web" 18 | }] 19 | }], 20 | "volumes": [], 21 | "DesiredStatus": "RUNNING", 22 | "KnownStatus": "NONE", 23 | "KnownTime": "0001-01-01T00:00:00Z", 24 | "SentStatus": "NONE" 25 | } 26 | -------------------------------------------------------------------------------- /agent/vendor/github.com/Sirupsen/logrus/terminal_notwindows.go: -------------------------------------------------------------------------------- 1 | // Based on ssh/terminal: 2 | // Copyright 2011 The Go Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style 4 | // license that can be found in the LICENSE file. 5 | 6 | // +build linux darwin freebsd openbsd netbsd dragonfly 7 | // +build !appengine 8 | 9 | package logrus 10 | 11 | import ( 12 | "syscall" 13 | "unsafe" 14 | ) 15 | 16 | // IsTerminal returns true if stderr's file descriptor is a terminal. 17 | func IsTerminal() bool { 18 | fd := syscall.Stderr 19 | var termios Termios 20 | _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0) 21 | return err == 0 22 | } 23 | -------------------------------------------------------------------------------- /agent/vendor/github.com/aws/aws-sdk-go/private/protocol/unmarshal.go: -------------------------------------------------------------------------------- 1 | package protocol 2 | 3 | import ( 4 | "io" 5 | "io/ioutil" 6 | 7 | "github.com/aws/aws-sdk-go/aws/request" 8 | ) 9 | 10 | // UnmarshalDiscardBodyHandler is a named request handler to empty and close a response's body 11 | var UnmarshalDiscardBodyHandler = request.NamedHandler{Name: "awssdk.shared.UnmarshalDiscardBody", Fn: UnmarshalDiscardBody} 12 | 13 | // UnmarshalDiscardBody is a request handler to empty a response's body and closing it. 14 | func UnmarshalDiscardBody(r *request.Request) { 15 | if r.HTTPResponse == nil || r.HTTPResponse.Body == nil { 16 | return 17 | } 18 | 19 | io.Copy(ioutil.Discard, r.HTTPResponse.Body) 20 | r.HTTPResponse.Body.Close() 21 | } 22 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/NOTICE: -------------------------------------------------------------------------------- 1 | Docker 2 | Copyright 2012-2016 Docker, Inc. 3 | 4 | This product includes software developed at Docker, Inc. (https://www.docker.com). 5 | 6 | This product contains software (https://github.com/kr/pty) developed 7 | by Keith Rarick, licensed under the MIT License. 8 | 9 | The following is courtesy of our legal counsel: 10 | 11 | 12 | Use and transfer of Docker may be subject to certain restrictions by the 13 | United States and other governments. 14 | It is your responsibility to ensure that your use and/or transfer does not 15 | violate applicable laws. 16 | 17 | For more information, please see https://www.bis.doc.gov 18 | 19 | See also https://www.apache.org/dev/crypto.html and/or seek legal counsel. 20 | -------------------------------------------------------------------------------- /misc/gremlin/Dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | # not use this file except in compliance with the License. A copy of the 5 | # License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is distributed 10 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | # express or implied. See the License for the specific language governing 12 | # permissions and limitations under the License. 13 | FROM amazon/amazon-ecs-gremlin:premake 14 | 15 | MAINTAINER Amazon Web Services, Inc. 16 | 17 | ENTRYPOINT ["/gremlin"] 18 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/unix/str.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency 10 | if val < 0 { 11 | return "-" + uitoa(uint(-val)) 12 | } 13 | return uitoa(uint(val)) 14 | } 15 | 16 | func uitoa(val uint) string { 17 | var buf [32]byte // big enough for int64 18 | i := len(buf) - 1 19 | for val >= 10 { 20 | buf[i] = byte(val%10 + '0') 21 | i-- 22 | val /= 10 23 | } 24 | buf[i] = byte(val + '0') 25 | return string(buf[i:]) 26 | } 27 | -------------------------------------------------------------------------------- /agent/sighandlers/debug_handler_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | // Copyright 2014-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"). You may 6 | // not use this file except in compliance with the License. A copy of the 7 | // License is located at 8 | // 9 | // http://aws.amazon.com/apache2.0/ 10 | // 11 | // or in the "license" file accompanying this file. This file is distributed 12 | // on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 | // express or implied. See the License for the specific language governing 14 | // permissions and limitations under the License. 15 | 16 | package sighandlers 17 | 18 | func StartDebugHandler() { 19 | } 20 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/windows/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows,race 6 | 7 | package windows 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /misc/pause-container/Dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | # not use this file except in compliance with the License. A copy of the 5 | # License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is distributed 10 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | # express or implied. See the License for the specific language governing 12 | # permissions and limitations under the License. 13 | 14 | FROM scratch 15 | MAINTAINER Amazon Web Services, Inc. 16 | COPY pause /usr/bin/ 17 | WORKDIR /usr/bin 18 | CMD ["./pause"] 19 | -------------------------------------------------------------------------------- /misc/windows-iam/iamroles.dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2014-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | # not use this file except in compliance with the License. A copy of the 5 | # License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is distributed 10 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | # express or implied. See the License for the specific language governing 12 | # permissions and limitations under the License. 13 | 14 | FROM microsoft/windowsservercore:latest 15 | 16 | ADD application.ps1 application.ps1 17 | ADD ec2.exe ec2.exe 18 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/taskdefinitions/fluentd-tag/task-definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "family":"ecs-fluentd-test", 3 | "containerDefinitions":[ 4 | { 5 | "name":"fluentd-test", 6 | "image":"127.0.0.1:51670/ubuntu:latest", 7 | "essential":true, 8 | "cpu":10, 9 | "memory":10, 10 | "command":[ 11 | "sh", 12 | "-c", 13 | "echo hello, this is fluentd functional test; sleep 30s;" 14 | ], 15 | "logConfiguration":{ 16 | "logDriver":"fluentd", 17 | "options":{ 18 | "fluentd-address":"localhost:24224", 19 | "tag":"ecs.{{.Name}}.{{.FullID}}" 20 | } 21 | } 22 | } 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/pkg/system/stat_freebsd.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import ( 4 | "syscall" 5 | ) 6 | 7 | // fromStatT converts a syscall.Stat_t type to a system.Stat_t type 8 | func fromStatT(s *syscall.Stat_t) (*StatT, error) { 9 | return &StatT{size: s.Size, 10 | mode: uint32(s.Mode), 11 | uid: s.Uid, 12 | gid: s.Gid, 13 | rdev: uint64(s.Rdev), 14 | mtim: s.Mtimespec}, nil 15 | } 16 | 17 | // Stat takes a path to a file and returns 18 | // a system.Stat_t type pertaining to that file. 19 | // 20 | // Throws an error if the file does not exist 21 | func Stat(path string) (*StatT, error) { 22 | s := &syscall.Stat_t{} 23 | if err := syscall.Stat(path, s); err != nil { 24 | return nil, err 25 | } 26 | return fromStatT(s) 27 | } 28 | -------------------------------------------------------------------------------- /misc/netkitten/linux.dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | # not use this file except in compliance with the License. A copy of the 5 | # License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is distributed 10 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | # express or implied. See the License for the specific language governing 12 | # permissions and limitations under the License. 13 | FROM amazon/amazon-ecs-netkitten:premake 14 | 15 | MAINTAINER Amazon Web Services, Inc. 16 | 17 | ENTRYPOINT ["/netkitten"] 18 | -------------------------------------------------------------------------------- /agent/functional_tests/tests/generated/generate_tests.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | // not use this file except in compliance with the License. A copy of the 5 | // License is located at 6 | // 7 | // http://aws.amazon.com/apache2.0/ 8 | // 9 | // or in the "license" file accompanying this file. This file is distributed 10 | // on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | // express or implied. See the License for the specific language governing 12 | // permissions and limitations under the License. 13 | 14 | package functional_tests 15 | 16 | //go:generate go run ../../generators/simpletests.go 17 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/taskdefinitions/fluentd-log-tag/task-definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "family":"ecs-fluentd-test", 3 | "containerDefinitions":[ 4 | { 5 | "name":"fluentd-test", 6 | "image":"127.0.0.1:51670/ubuntu:latest", 7 | "essential":true, 8 | "cpu":10, 9 | "memory":10, 10 | "command":[ 11 | "sh", 12 | "-c", 13 | "echo hello, this is fluentd functional test; sleep 30s;" 14 | ], 15 | "logConfiguration":{ 16 | "logDriver":"fluentd", 17 | "options":{ 18 | "fluentd-address":"localhost:24224", 19 | "fluentd-tag":"ecs.{{.Name}}.{{.FullID}}" 20 | } 21 | } 22 | } 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/unix/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin,race linux,race freebsd,race 6 | 7 | package unix 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/pkg/archive/changes_windows.go: -------------------------------------------------------------------------------- 1 | package archive 2 | 3 | import ( 4 | "os" 5 | 6 | "github.com/docker/docker/pkg/system" 7 | ) 8 | 9 | func statDifferent(oldStat *system.StatT, newStat *system.StatT) bool { 10 | 11 | // Don't look at size for dirs, its not a good measure of change 12 | if oldStat.ModTime() != newStat.ModTime() || 13 | oldStat.Mode() != newStat.Mode() || 14 | oldStat.Size() != newStat.Size() && !oldStat.IsDir() { 15 | return true 16 | } 17 | return false 18 | } 19 | 20 | func (info *FileInfo) isDir() bool { 21 | return info.parent == nil || info.stat.IsDir() 22 | } 23 | 24 | func getIno(fi os.FileInfo) (inode uint64) { 25 | return 26 | } 27 | 28 | func hasHardlinks(fi os.FileInfo) bool { 29 | return false 30 | } 31 | -------------------------------------------------------------------------------- /agent/vendor/github.com/vishvananda/netlink/nl/xfrm_monitor_linux.go: -------------------------------------------------------------------------------- 1 | package nl 2 | 3 | import ( 4 | "unsafe" 5 | ) 6 | 7 | const ( 8 | SizeofXfrmUserExpire = 0xe8 9 | ) 10 | 11 | // struct xfrm_user_expire { 12 | // struct xfrm_usersa_info state; 13 | // __u8 hard; 14 | // }; 15 | 16 | type XfrmUserExpire struct { 17 | XfrmUsersaInfo XfrmUsersaInfo 18 | Hard uint8 19 | Pad [7]byte 20 | } 21 | 22 | func (msg *XfrmUserExpire) Len() int { 23 | return SizeofXfrmUserExpire 24 | } 25 | 26 | func DeserializeXfrmUserExpire(b []byte) *XfrmUserExpire { 27 | return (*XfrmUserExpire)(unsafe.Pointer(&b[0:SizeofXfrmUserExpire][0])) 28 | } 29 | 30 | func (msg *XfrmUserExpire) Serialize() []byte { 31 | return (*(*[SizeofXfrmUserExpire]byte)(unsafe.Pointer(msg)))[:] 32 | } 33 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/unix/asm_linux_s390x.s: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build s390x 6 | // +build linux 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // 12 | // System calls for s390x, Linux 13 | // 14 | 15 | // Just jump to package syscall's implementation for all these functions. 16 | // The runtime may know about them. 17 | 18 | TEXT ·Syscall(SB),NOSPLIT,$0-56 19 | BR syscall·Syscall(SB) 20 | 21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 22 | BR syscall·Syscall6(SB) 23 | 24 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 25 | BR syscall·RawSyscall(SB) 26 | 27 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 28 | BR syscall·RawSyscall6(SB) 29 | -------------------------------------------------------------------------------- /agent/logger/audit/request/request.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | // not use this file except in compliance with the License. A copy of the 5 | // License is located at 6 | // 7 | // http://aws.amazon.com/apache2.0/ 8 | // 9 | // or in the "license" file accompanying this file. This file is distributed 10 | // on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | // express or implied. See the License for the specific language governing 12 | // permissions and limitations under the License. 13 | 14 | package request 15 | 16 | import "net/http" 17 | 18 | type LogRequest struct { 19 | Request *http.Request 20 | ARN string 21 | } 22 | -------------------------------------------------------------------------------- /agent/vendor/github.com/aws/aws-sdk-go/aws/url_1_7.go: -------------------------------------------------------------------------------- 1 | // +build !go1.8 2 | 3 | package aws 4 | 5 | import ( 6 | "net/url" 7 | "strings" 8 | ) 9 | 10 | // URLHostname will extract the Hostname without port from the URL value. 11 | // 12 | // Copy of Go 1.8's net/url#URL.Hostname functionality. 13 | func URLHostname(url *url.URL) string { 14 | return stripPort(url.Host) 15 | 16 | } 17 | 18 | // stripPort is copy of Go 1.8 url#URL.Hostname functionality. 19 | // https://golang.org/src/net/url/url.go 20 | func stripPort(hostport string) string { 21 | colon := strings.IndexByte(hostport, ':') 22 | if colon == -1 { 23 | return hostport 24 | } 25 | if i := strings.IndexByte(hostport, ']'); i != -1 { 26 | return strings.TrimPrefix(hostport[:i], "[") 27 | } 28 | return hostport[:colon] 29 | } 30 | -------------------------------------------------------------------------------- /agent/app/generate_mocks.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | // not use this file except in compliance with the License. A copy of the 5 | // License is located at 6 | // 7 | // http://aws.amazon.com/apache2.0/ 8 | // 9 | // or in the "license" file accompanying this file. This file is distributed 10 | // on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | // express or implied. See the License for the specific language governing 12 | // permissions and limitations under the License. 13 | 14 | package app 15 | 16 | //go:generate go run ../../scripts/generate/mockgen.go github.com/aws/aws-sdk-go/aws/credentials Provider mocks/credentials_mocks.go 17 | -------------------------------------------------------------------------------- /agent/async/generate_mocks.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | // not use this file except in compliance with the License. A copy of the 5 | // License is located at 6 | // 7 | // http://aws.amazon.com/apache2.0/ 8 | // 9 | // or in the "license" file accompanying this file. This file is distributed 10 | // on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | // express or implied. See the License for the specific language governing 12 | // permissions and limitations under the License. 13 | 14 | package async 15 | 16 | //go:generate go run ../../scripts/generate/mockgen.go github.com/aws/amazon-ecs-agent/agent/async Cache mocks/async_mocks.go 17 | -------------------------------------------------------------------------------- /agent/ecr/model/generate.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | // not use this file except in compliance with the License. A copy of the 5 | // License is located at 6 | // 7 | // http://aws.amazon.com/apache2.0/ 8 | // 9 | // or in the "license" file accompanying this file. This file is distributed 10 | // on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | // express or implied. See the License for the specific language governing 12 | // permissions and limitations under the License. 13 | 14 | package model 15 | 16 | // codegen tag required by AWS SDK generators 17 | //go:generate go run -tags codegen ../../gogenerate/awssdk.go -typesOnly=false 18 | -------------------------------------------------------------------------------- /agent/eni/networkutils/consts.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | // not use this file except in compliance with the License. A copy of the 5 | // License is located at 6 | // 7 | // http://aws.amazon.com/apache2.0/ 8 | // 9 | // or in the "license" file accompanying this file. This file is distributed 10 | // on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | // express or implied. See the License for the specific language governing 12 | // permissions and limitations under the License. 13 | 14 | package networkutils 15 | 16 | const ( 17 | pciDevicePrefix = "pci" 18 | vifDevicePrefix = "vif" 19 | virtualDevicePrefix = "virtual" 20 | ) 21 | -------------------------------------------------------------------------------- /agent/vendor/github.com/Azure/go-ansiterm/osc_string_state.go: -------------------------------------------------------------------------------- 1 | package ansiterm 2 | 3 | type oscStringState struct { 4 | baseState 5 | } 6 | 7 | func (oscState oscStringState) Handle(b byte) (s state, e error) { 8 | logger.Infof("OscString::Handle %#x", b) 9 | nextState, err := oscState.baseState.Handle(b) 10 | if nextState != nil || err != nil { 11 | return nextState, err 12 | } 13 | 14 | switch { 15 | case isOscStringTerminator(b): 16 | return oscState.parser.ground, nil 17 | } 18 | 19 | return oscState, nil 20 | } 21 | 22 | // See below for OSC string terminators for linux 23 | // http://man7.org/linux/man-pages/man4/console_codes.4.html 24 | func isOscStringTerminator(b byte) bool { 25 | 26 | if b == ANSI_BEL || b == 0x5C { 27 | return true 28 | } 29 | 30 | return false 31 | } 32 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux 6 | // +build ppc64 ppc64le 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // 12 | // System calls for ppc64, Linux 13 | // 14 | 15 | // Just jump to package syscall's implementation for all these functions. 16 | // The runtime may know about them. 17 | 18 | TEXT ·Syscall(SB),NOSPLIT,$0-56 19 | BR syscall·Syscall(SB) 20 | 21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 22 | BR syscall·Syscall6(SB) 23 | 24 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 25 | BR syscall·RawSyscall(SB) 26 | 27 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 28 | BR syscall·RawSyscall6(SB) 29 | -------------------------------------------------------------------------------- /misc/volumes-test/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | # not use this file except in compliance with the License. A copy of the 5 | # License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is distributed 10 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | # express or implied. See the License for the specific language governing 12 | # permissions and limitations under the License. 13 | .PHONY: all clean docker image 14 | 15 | all: image 16 | 17 | image: 18 | @./docker-image 19 | 20 | 21 | clean: 22 | -docker rmi "amazon/amazon-ecs-volumes-test:make" 23 | -------------------------------------------------------------------------------- /agent/ec2/http/generate_mocks.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | // not use this file except in compliance with the License. A copy of the 5 | // License is located at 6 | // 7 | // http://aws.amazon.com/apache2.0/ 8 | // 9 | // or in the "license" file accompanying this file. This file is distributed 10 | // on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | // express or implied. See the License for the specific language governing 12 | // permissions and limitations under the License. 13 | 14 | package http 15 | 16 | //go:generate go run ../../../scripts/generate/mockgen.go github.com/aws/amazon-ecs-agent/agent/ec2/http Client mocks/http_mocks.go 17 | -------------------------------------------------------------------------------- /agent/statemanager/helper_unix_test.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | // Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"). You may 6 | // not use this file except in compliance with the License. A copy of the 7 | // License is located at 8 | // 9 | // http://aws.amazon.com/apache2.0/ 10 | // 11 | // or in the "license" file accompanying this file. This file is distributed 12 | // on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 | // express or implied. See the License for the specific language governing 14 | // permissions and limitations under the License. 15 | 16 | package statemanager_test 17 | 18 | func setupWindowsTest(path string) (func(), error) { 19 | return func() {}, nil 20 | } 21 | -------------------------------------------------------------------------------- /agent/vendor/github.com/jmespath/go-jmespath/toktype_string.go: -------------------------------------------------------------------------------- 1 | // generated by stringer -type=tokType; DO NOT EDIT 2 | 3 | package jmespath 4 | 5 | import "fmt" 6 | 7 | const _tokType_name = "tUnknowntStartDottFiltertFlattentLparentRparentLbrackettRbrackettLbracetRbracetOrtPipetNumbertUnquotedIdentifiertQuotedIdentifiertCommatColontLTtLTEtGTtGTEtEQtNEtJSONLiteraltStringLiteraltCurrenttExpreftAndtNottEOF" 8 | 9 | var _tokType_index = [...]uint8{0, 8, 13, 17, 24, 32, 39, 46, 55, 64, 71, 78, 81, 86, 93, 112, 129, 135, 141, 144, 148, 151, 155, 158, 161, 173, 187, 195, 202, 206, 210, 214} 10 | 11 | func (i tokType) String() string { 12 | if i < 0 || i >= tokType(len(_tokType_index)-1) { 13 | return fmt.Sprintf("tokType(%d)", i) 14 | } 15 | return _tokType_name[_tokType_index[i]:_tokType_index[i+1]] 16 | } 17 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/unix/asm_linux_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for arm, Linux 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 23 | B syscall·RawSyscall(SB) 24 | 25 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 26 | B syscall·RawSyscall6(SB) 27 | 28 | TEXT ·seek(SB),NOSPLIT,$0-32 29 | B syscall·seek(SB) 30 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux 6 | // +build mips64 mips64le 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // 12 | // System calls for mips64, Linux 13 | // 14 | 15 | // Just jump to package syscall's implementation for all these functions. 16 | // The runtime may know about them. 17 | 18 | TEXT ·Syscall(SB),NOSPLIT,$0-56 19 | JMP syscall·Syscall(SB) 20 | 21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 22 | JMP syscall·Syscall6(SB) 23 | 24 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 25 | JMP syscall·RawSyscall(SB) 26 | 27 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 28 | JMP syscall·RawSyscall6(SB) 29 | -------------------------------------------------------------------------------- /agent/ecs_client/model/generate.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | // not use this file except in compliance with the License. A copy of the 5 | // License is located at 6 | // 7 | // http://aws.amazon.com/apache2.0/ 8 | // 9 | // or in the "license" file accompanying this file. This file is distributed 10 | // on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | // express or implied. See the License for the specific language governing 12 | // permissions and limitations under the License. 13 | 14 | package model 15 | 16 | // codegen tag required by AWS SDK generators 17 | //go:generate go run -tags codegen ../../gogenerate/awssdk.go -typesOnly=false 18 | -------------------------------------------------------------------------------- /agent/eni/pause/generate_mocks.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | // not use this file except in compliance with the License. A copy of the 5 | // License is located at 6 | // 7 | // http://aws.amazon.com/apache2.0/ 8 | // 9 | // or in the "license" file accompanying this file. This file is distributed 10 | // on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | // express or implied. See the License for the specific language governing 12 | // permissions and limitations under the License. 13 | 14 | package pause 15 | 16 | //go:generate go run ../../../scripts/generate/mockgen.go github.com/aws/amazon-ecs-agent/agent/eni/pause Loader mocks/load_mocks.go 17 | -------------------------------------------------------------------------------- /agent/vendor/github.com/Sirupsen/logrus/terminal_windows.go: -------------------------------------------------------------------------------- 1 | // Based on ssh/terminal: 2 | // Copyright 2011 The Go Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style 4 | // license that can be found in the LICENSE file. 5 | 6 | // +build windows,!appengine 7 | 8 | package logrus 9 | 10 | import ( 11 | "syscall" 12 | "unsafe" 13 | ) 14 | 15 | var kernel32 = syscall.NewLazyDLL("kernel32.dll") 16 | 17 | var ( 18 | procGetConsoleMode = kernel32.NewProc("GetConsoleMode") 19 | ) 20 | 21 | // IsTerminal returns true if stderr's file descriptor is a terminal. 22 | func IsTerminal() bool { 23 | fd := syscall.Stderr 24 | var st uint32 25 | r, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(fd), uintptr(unsafe.Pointer(&st)), 0) 26 | return r != 0 && e == 0 27 | } 28 | -------------------------------------------------------------------------------- /misc/netkitten/windows.dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2014-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | # not use this file except in compliance with the License. A copy of the 5 | # License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is distributed 10 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | # express or implied. See the License for the specific language governing 12 | # permissions and limitations under the License. 13 | FROM microsoft/windowsservercore:latest 14 | 15 | MAINTAINER Amazon Web Services, Inc. 16 | 17 | ADD netkitten.exe C:/netkitten.exe 18 | 19 | ENTRYPOINT ["C:\\netkitten.exe"] 20 | -------------------------------------------------------------------------------- /misc/testnnp/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | # not use this file except in compliance with the License. A copy of the 5 | # License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is distributed 10 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | # express or implied. See the License for the specific language governing 12 | # permissions and limitations under the License. 13 | .PHONY: all clean docker image 14 | 15 | all: image 16 | 17 | image: 18 | docker build -f Dockerfile -t "amazon/testnnp:make" . 19 | 20 | clean: 21 | -docker rmi "amazon/testnnp:make" 22 | -------------------------------------------------------------------------------- /misc/volumes-test/build.ps1: -------------------------------------------------------------------------------- 1 | # Copyright 2014-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | # not use this file except in compliance with the License. A copy of the 5 | # License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is distributed 10 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | # express or implied. See the License for the specific language governing 12 | # permissions and limitations under the License. 13 | 14 | 15 | # TODO be smart about this and only rebuild if necessary 16 | docker build -t "amazon/amazon-ecs-volumes-test:make" -f "${PSScriptRoot}/windows.dockerfile" ${PSScriptRoot} 17 | -------------------------------------------------------------------------------- /agent/ec2/generate_mocks.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | // not use this file except in compliance with the License. A copy of the 5 | // License is located at 6 | // 7 | // http://aws.amazon.com/apache2.0/ 8 | // 9 | // or in the "license" file accompanying this file. This file is distributed 10 | // on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | // express or implied. See the License for the specific language governing 12 | // permissions and limitations under the License. 13 | 14 | package ec2 15 | 16 | //go:generate go run ../../scripts/generate/mockgen.go github.com/aws/amazon-ecs-agent/agent/ec2 EC2MetadataClient,HttpClient mocks/ec2_mocks.go 17 | -------------------------------------------------------------------------------- /agent/ecr/generate_mocks.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | // not use this file except in compliance with the License. A copy of the 5 | // License is located at 6 | // 7 | // http://aws.amazon.com/apache2.0/ 8 | // 9 | // or in the "license" file accompanying this file. This file is distributed 10 | // on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | // express or implied. See the License for the specific language governing 12 | // permissions and limitations under the License. 13 | 14 | package ecr 15 | 16 | //go:generate go run ../../scripts/generate/mockgen.go github.com/aws/amazon-ecs-agent/agent/ecr ECRSDK,ECRFactory,ECRClient mocks/ecr_mocks.go 17 | -------------------------------------------------------------------------------- /agent/utils/generate_mocks.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | // not use this file except in compliance with the License. A copy of the 5 | // License is located at 6 | // 7 | // http://aws.amazon.com/apache2.0/ 8 | // 9 | // or in the "license" file accompanying this file. This file is distributed 10 | // on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | // express or implied. See the License for the specific language governing 12 | // permissions and limitations under the License. 13 | 14 | package utils 15 | 16 | //go:generate go run ../../scripts/generate/mockgen.go github.com/aws/amazon-ecs-agent/agent/utils LicenseProvider,Backoff mocks/utils_mocks.go 17 | -------------------------------------------------------------------------------- /agent/utils/ttime/generate_mocks.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | // not use this file except in compliance with the License. A copy of the 5 | // License is located at 6 | // 7 | // http://aws.amazon.com/apache2.0/ 8 | // 9 | // or in the "license" file accompanying this file. This file is distributed 10 | // on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | // express or implied. See the License for the specific language governing 12 | // permissions and limitations under the License. 13 | 14 | package ttime 15 | 16 | //go:generate go run ../../../scripts/generate/mockgen.go github.com/aws/amazon-ecs-agent/agent/utils/ttime Time,Timer mocks/time_mocks.go 17 | -------------------------------------------------------------------------------- /agent/vendor/github.com/pkg/errors/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: build-{build}.{branch} 2 | 3 | clone_folder: C:\gopath\src\github.com\pkg\errors 4 | shallow_clone: true # for startup speed 5 | 6 | environment: 7 | GOPATH: C:\gopath 8 | 9 | platform: 10 | - x64 11 | 12 | # http://www.appveyor.com/docs/installed-software 13 | install: 14 | # some helpful output for debugging builds 15 | - go version 16 | - go env 17 | # pre-installed MinGW at C:\MinGW is 32bit only 18 | # but MSYS2 at C:\msys64 has mingw64 19 | - set PATH=C:\msys64\mingw64\bin;%PATH% 20 | - gcc --version 21 | - g++ --version 22 | 23 | build_script: 24 | - go install -v ./... 25 | 26 | test_script: 27 | - set PATH=C:\gopath\bin;%PATH% 28 | - go test -v ./... 29 | 30 | #artifacts: 31 | # - path: '%GOPATH%\bin\*.exe' 32 | deploy: off 33 | -------------------------------------------------------------------------------- /agent/api/generate_mocks.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | // not use this file except in compliance with the License. A copy of the 5 | // License is located at 6 | // 7 | // http://aws.amazon.com/apache2.0/ 8 | // 9 | // or in the "license" file accompanying this file. This file is distributed 10 | // on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | // express or implied. See the License for the specific language governing 12 | // permissions and limitations under the License. 13 | 14 | package api 15 | 16 | //go:generate go run ../../scripts/generate/mockgen.go github.com/aws/amazon-ecs-agent/agent/api ECSSDK,ECSSubmitStateSDK,ECSClient mocks/api_mocks.go 17 | -------------------------------------------------------------------------------- /agent/app/oswrapper/generate_mocks.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | // not use this file except in compliance with the License. A copy of the 5 | // License is located at 6 | // 7 | // http://aws.amazon.com/apache2.0/ 8 | // 9 | // or in the "license" file accompanying this file. This file is distributed 10 | // on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | // express or implied. See the License for the specific language governing 12 | // permissions and limitations under the License. 13 | 14 | package oswrapper 15 | 16 | //go:generate go run ../../../scripts/generate/mockgen.go github.com/aws/amazon-ecs-agent/agent/app/oswrapper OS mocks/oswrapper_mocks.go 17 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/unix/asm_netbsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /agent/credentials/generate_mocks.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | // not use this file except in compliance with the License. A copy of the 5 | // License is located at 6 | // 7 | // http://aws.amazon.com/apache2.0/ 8 | // 9 | // or in the "license" file accompanying this file. This file is distributed 10 | // on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | // express or implied. See the License for the specific language governing 12 | // permissions and limitations under the License. 13 | 14 | package credentials 15 | 16 | //go:generate go run ../../scripts/generate/mockgen.go github.com/aws/amazon-ecs-agent/agent/credentials Manager mocks/credentials_mocks.go 17 | -------------------------------------------------------------------------------- /agent/vendor/github.com/fsouza/go-dockerclient/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: required 3 | go: 4 | - 1.7.x 5 | - 1.8.x 6 | - tip 7 | os: 8 | - linux 9 | - osx 10 | env: 11 | matrix: 12 | - GOARCH=amd64 DOCKER_VERSION=1.12.6 13 | - GOARCH=386 DOCKER_VERSION=1.12.6 14 | - GOARCH=amd64 DOCKER_VERSION=1.13.1 15 | - GOARCH=386 DOCKER_VERSION=1.13.1 16 | global: 17 | - GO_TEST_FLAGS=-race 18 | - DOCKER_HOST=tcp://127.0.0.1:2375 19 | install: 20 | - make testdeps 21 | - travis_retry travis-scripts/install-docker.bash 22 | script: 23 | - travis-scripts/run-tests.bash 24 | services: 25 | - docker 26 | matrix: 27 | fast_finish: true 28 | exclude: 29 | - os: osx 30 | env: GOARCH=amd64 DOCKER_VERSION=1.12.6 31 | - os: osx 32 | env: GOARCH=386 DOCKER_VERSION=1.12.6 33 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/unix/asm_freebsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /misc/testnnp/testnnp.c: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright 2014-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"). You may 5 | not use this file except in compliance with the License. A copy of the 6 | License is located at 7 | 8 | http://aws.amazon.com/apache2.0/ 9 | 10 | or in the "license" file accompanying this file. This file is distributed 11 | on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | express or implied. See the License for the specific language governing 13 | permissions and limitations under the License. 14 | */ 15 | 16 | #include 17 | #include 18 | #include 19 | 20 | int main(int argc, char *argv[]) 21 | { 22 | if(geteuid() == 0) { 23 | return 1; 24 | } 25 | return 42; 26 | } 27 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/unix/asm_darwin_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, Darwin 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/unix/asm_netbsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /scripts/test: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). You may 5 | # not use this file except in compliance with the License. A copy of the 6 | # License is located at 7 | # 8 | # http://aws.amazon.com/apache2.0/ 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | 15 | # Start docker for our tests.. 16 | DOCKER_DAEMON_ARGS="--insecure-registry 127.0.0.1:51671 --insecure-registry 127.0.0.1:51670" wrapdocker &> /dev/null 17 | 18 | sleep 2 19 | 20 | make test 21 | -------------------------------------------------------------------------------- /agent/eni/udevwrapper/generate_mocks.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | // not use this file except in compliance with the License. A copy of the 5 | // License is located at 6 | // 7 | // http://aws.amazon.com/apache2.0/ 8 | // 9 | // or in the "license" file accompanying this file. This file is distributed 10 | // on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | // express or implied. See the License for the specific language governing 12 | // permissions and limitations under the License. 13 | 14 | package udevwrapper 15 | 16 | //go:generate go run ../../../scripts/generate/mockgen.go github.com/aws/amazon-ecs-agent/agent/eni/udevwrapper Udev mocks/mock_udevwrapper_linux.go 17 | -------------------------------------------------------------------------------- /agent/logger/audit/generate_mocks.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | // not use this file except in compliance with the License. A copy of the 5 | // License is located at 6 | // 7 | // http://aws.amazon.com/apache2.0/ 8 | // 9 | // or in the "license" file accompanying this file. This file is distributed 10 | // on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | // express or implied. See the License for the specific language governing 12 | // permissions and limitations under the License. 13 | 14 | package audit 15 | 16 | //go:generate go run ../../../scripts/generate/mockgen.go github.com/aws/amazon-ecs-agent/agent/logger/audit AuditLogger,InfoLogger mocks/audit_log_mocks.go 17 | -------------------------------------------------------------------------------- /agent/statemanager/generate_mocks.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | // not use this file except in compliance with the License. A copy of the 5 | // License is located at 6 | // 7 | // http://aws.amazon.com/apache2.0/ 8 | // 9 | // or in the "license" file accompanying this file. This file is distributed 10 | // on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | // express or implied. See the License for the specific language governing 12 | // permissions and limitations under the License. 13 | 14 | package statemanager 15 | 16 | //go:generate go run ../../scripts/generate/mockgen.go github.com/aws/amazon-ecs-agent/agent/statemanager StateManager mocks/statemanager_mocks.go 17 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/unix/asm_darwin_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, Darwin 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/unix/asm_freebsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/unix/asm_linux_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for AMD64, Linux 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 23 | JMP syscall·RawSyscall(SB) 24 | 25 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 26 | JMP syscall·RawSyscall6(SB) 27 | 28 | TEXT ·gettimeofday(SB),NOSPLIT,$0-16 29 | JMP syscall·gettimeofday(SB) 30 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/unix/asm_openbsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /misc/pause-container/buildPause/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | # not use this file except in compliance with the License. A copy of the 5 | # License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is distributed 10 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | # express or implied. See the License for the specific language governing 12 | # permissions and limitations under the License. 13 | 14 | .PHONY: all 15 | 16 | BIN = /out/pause 17 | SRCS = pause.c 18 | CFLAGS = -Os -Wall -Werror -static 19 | GCC = gcc 20 | 21 | all: bin 22 | 23 | bin: 24 | $(GCC) $(CFLAGS) $(SRCS) -o $(BIN) 25 | -------------------------------------------------------------------------------- /agent/app/factory/generate_mocks.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | // not use this file except in compliance with the License. A copy of the 5 | // License is located at 6 | // 7 | // http://aws.amazon.com/apache2.0/ 8 | // 9 | // or in the "license" file accompanying this file. This file is distributed 10 | // on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | // express or implied. See the License for the specific language governing 12 | // permissions and limitations under the License. 13 | 14 | package factory 15 | 16 | //go:generate go run ../../../scripts/generate/mockgen.go github.com/aws/amazon-ecs-agent/agent/app/factory StateManager,SaveableOption mocks/factory_mocks.go 17 | -------------------------------------------------------------------------------- /agent/engine/dockeriface/generate_mocks.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | // not use this file except in compliance with the License. A copy of the 5 | // License is located at 6 | // 7 | // http://aws.amazon.com/apache2.0/ 8 | // 9 | // or in the "license" file accompanying this file. This file is distributed 10 | // on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | // express or implied. See the License for the specific language governing 12 | // permissions and limitations under the License. 13 | 14 | package dockeriface 15 | 16 | //go:generate go run ../../../scripts/generate/mockgen.go github.com/aws/amazon-ecs-agent/agent/engine/dockeriface Client mocks/dockeriface_mocks.go 17 | -------------------------------------------------------------------------------- /agent/functional_tests/testdata/taskdefinitions/fluentd-driver/task-definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "family":"ecs-fts-fluentd-driver", 3 | "containerDefinitions":[ 4 | { 5 | "memory":100, 6 | "name":"fluentd-driver", 7 | "cpu":10, 8 | "image":"127.0.0.1:51670/amazon/fluentd:latest", 9 | "portMappings":[ 10 | { 11 | "containerPort":24224, 12 | "hostPort":24224 13 | } 14 | ], 15 | "mountPoints":[ 16 | { 17 | "sourceVolume":"logs", 18 | "containerPath":"/fluentd/log" 19 | } 20 | ] 21 | } 22 | ], 23 | "volumes":[ 24 | { 25 | "name":"logs", 26 | "host":{ 27 | "sourcePath":"/tmp" 28 | } 29 | } 30 | ] 31 | } 32 | -------------------------------------------------------------------------------- /agent/vendor/github.com/containernetworking/cni/pkg/invoke/os_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 CNI authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package invoke 16 | 17 | // Valid file extensions for plugin executables. 18 | var ExecutableFileExtensions = []string{".exe", ""} 19 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, DragonFly 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-64 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-88 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-112 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-64 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-88 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /agent/engine/dockerclient/generate_mocks.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | // not use this file except in compliance with the License. A copy of the 5 | // License is located at 6 | // 7 | // http://aws.amazon.com/apache2.0/ 8 | // 9 | // or in the "license" file accompanying this file. This file is distributed 10 | // on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | // express or implied. See the License for the specific language governing 12 | // permissions and limitations under the License. 13 | 14 | package dockerclient 15 | 16 | //go:generate go run ../../../scripts/generate/mockgen.go github.com/aws/amazon-ecs-agent/agent/engine/dockerclient Factory mocks/dockerclient_mocks.go 17 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/unix/asm_darwin_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | // +build arm,darwin 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System call support for ARM, Darwin 12 | // 13 | 14 | // Just jump to package syscall's implementation for all these functions. 15 | // The runtime may know about them. 16 | 17 | TEXT ·Syscall(SB),NOSPLIT,$0-28 18 | B syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 21 | B syscall·Syscall6(SB) 22 | 23 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 24 | B syscall·Syscall9(SB) 25 | 26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 27 | B syscall·RawSyscall(SB) 28 | 29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 30 | B syscall·RawSyscall6(SB) 31 | -------------------------------------------------------------------------------- /agent/engine/dockerstate/generate_mocks.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | // not use this file except in compliance with the License. A copy of the 5 | // License is located at 6 | // 7 | // http://aws.amazon.com/apache2.0/ 8 | // 9 | // or in the "license" file accompanying this file. This file is distributed 10 | // on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | // express or implied. See the License for the specific language governing 12 | // permissions and limitations under the License. 13 | 14 | package dockerstate 15 | 16 | //go:generate go run ../../../scripts/generate/mockgen.go github.com/aws/amazon-ecs-agent/agent/engine/dockerstate TaskEngineState mocks/dockerstate_mocks.go 17 | -------------------------------------------------------------------------------- /agent/eni/netlinkwrapper/generate_mocks.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | // not use this file except in compliance with the License. A copy of the 5 | // License is located at 6 | // 7 | // http://aws.amazon.com/apache2.0/ 8 | // 9 | // or in the "license" file accompanying this file. This file is distributed 10 | // on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | // express or implied. See the License for the specific language governing 12 | // permissions and limitations under the License. 13 | 14 | package netlinkwrapper 15 | 16 | //go:generate go run ../../../scripts/generate/mockgen.go github.com/aws/amazon-ecs-agent/agent/eni/netlinkwrapper NetLink mocks/mock_netlinkwrapper_linux.go 17 | -------------------------------------------------------------------------------- /agent/vendor/github.com/davecgh/go-spew/LICENSE: -------------------------------------------------------------------------------- 1 | ISC License 2 | 3 | Copyright (c) 2012-2013 Dave Collins 4 | 5 | Permission to use, copy, modify, and distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /agent/vendor/github.com/fsouza/go-dockerclient/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: \ 2 | all \ 3 | lint \ 4 | vet \ 5 | fmt \ 6 | fmtcheck \ 7 | pretest \ 8 | test \ 9 | integration \ 10 | clean 11 | 12 | all: test 13 | 14 | lint: 15 | @ go get -v github.com/golang/lint/golint 16 | [ -z "$$(golint . | grep -v 'type name will be used as docker.DockerInfo' | grep -v 'context.Context should be the first' | tee /dev/stderr)" ] 17 | 18 | vet: 19 | go vet ./... 20 | 21 | fmt: 22 | gofmt -s -w . 23 | 24 | fmtcheck: 25 | [ -z "$$(gofmt -s -d . | tee /dev/stderr)" ] 26 | 27 | testdeps: 28 | go get -d -t ./... 29 | 30 | pretest: testdeps lint vet fmtcheck 31 | 32 | gotest: 33 | go test $(GO_TEST_FLAGS) ./... 34 | 35 | test: pretest gotest 36 | 37 | integration: 38 | go test -tags docker_integration -run TestIntegration -v 39 | 40 | clean: 41 | go clean ./... 42 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | // +build arm64,darwin 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System call support for AMD64, Darwin 12 | // 13 | 14 | // Just jump to package syscall's implementation for all these functions. 15 | // The runtime may know about them. 16 | 17 | TEXT ·Syscall(SB),NOSPLIT,$0-56 18 | B syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 21 | B syscall·Syscall6(SB) 22 | 23 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 24 | B syscall·Syscall9(SB) 25 | 26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 27 | B syscall·RawSyscall(SB) 28 | 29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 30 | B syscall·RawSyscall6(SB) 31 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/unix/bluetooth_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Bluetooth sockets and messages 6 | 7 | package unix 8 | 9 | // Bluetooth Protocols 10 | const ( 11 | BTPROTO_L2CAP = 0 12 | BTPROTO_HCI = 1 13 | BTPROTO_SCO = 2 14 | BTPROTO_RFCOMM = 3 15 | BTPROTO_BNEP = 4 16 | BTPROTO_CMTP = 5 17 | BTPROTO_HIDP = 6 18 | BTPROTO_AVDTP = 7 19 | ) 20 | 21 | const ( 22 | HCI_CHANNEL_RAW = 0 23 | HCI_CHANNEL_USER = 1 24 | HCI_CHANNEL_MONITOR = 2 25 | HCI_CHANNEL_CONTROL = 3 26 | ) 27 | 28 | // Socketoption Level 29 | const ( 30 | SOL_BLUETOOTH = 0x112 31 | SOL_HCI = 0x0 32 | SOL_L2CAP = 0x6 33 | SOL_RFCOMM = 0x12 34 | SOL_SCO = 0x11 35 | ) 36 | -------------------------------------------------------------------------------- /misc/volumes-test/docker-image: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). You may 5 | # not use this file except in compliance with the License. A copy of the 6 | # License is located at 7 | # 8 | # http://aws.amazon.com/apache2.0/ 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | 15 | if ! docker images | awk '{print $1":"$2}' | grep "amazon/amazon-ecs-volumes-test:make" > /dev/null ; then 16 | docker build -q -t "amazon/amazon-ecs-volumes-test:make" -f "linux.dockerfile" . 17 | fi 18 | -------------------------------------------------------------------------------- /scripts/dockerfiles/Dockerfile.buildCNIPlugins: -------------------------------------------------------------------------------- 1 | # Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | # not use this file except in compliance with the License. A copy of the 5 | # License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is distributed 10 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | # express or implied. See the License for the specific language governing 12 | # permissions and limitations under the License. 13 | 14 | FROM golang:1.7 15 | MAINTAINER Amazon Web Services, Inc. 16 | 17 | RUN mkdir -p /go/src/github.com/aws/ 18 | 19 | WORKDIR /go/src/github.com/aws/amazon-ecs-cni-plugins 20 | 21 | CMD ["make", "plugins"] 22 | -------------------------------------------------------------------------------- /agent/vendor/github.com/pborman/uuid/json.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package uuid 6 | 7 | import "errors" 8 | 9 | func (u UUID) MarshalJSON() ([]byte, error) { 10 | if len(u) == 0 { 11 | return []byte(`""`), nil 12 | } 13 | return []byte(`"` + u.String() + `"`), nil 14 | } 15 | 16 | func (u *UUID) UnmarshalJSON(data []byte) error { 17 | if len(data) == 0 || string(data) == `""` { 18 | return nil 19 | } 20 | if len(data) < 2 || data[0] != '"' || data[len(data)-1] != '"' { 21 | return errors.New("invalid UUID format") 22 | } 23 | data = data[1 : len(data)-1] 24 | uu := Parse(string(data)) 25 | if uu == nil { 26 | return errors.New("invalid UUID format") 27 | } 28 | *u = uu 29 | return nil 30 | } 31 | -------------------------------------------------------------------------------- /scripts/dockerfiles/Dockerfile.buildPause: -------------------------------------------------------------------------------- 1 | # Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | # not use this file except in compliance with the License. A copy of the 5 | # License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is distributed 10 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | # express or implied. See the License for the specific language governing 12 | # permissions and limitations under the License. 13 | 14 | FROM gcc:4.9 15 | MAINTAINER Amazon Web Services, Inc. 16 | 17 | RUN mkdir /out 18 | VOLUME ['/out'] 19 | 20 | RUN mkdir -p /usr/src/buildPause/ 21 | 22 | WORKDIR /usr/src/buildPause 23 | 24 | CMD ["make", "all"] 25 | -------------------------------------------------------------------------------- /agent/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go: -------------------------------------------------------------------------------- 1 | // +build !go1.8 2 | 3 | package request 4 | 5 | import "io" 6 | 7 | // NoBody is an io.ReadCloser with no bytes. Read always returns EOF 8 | // and Close always returns nil. It can be used in an outgoing client 9 | // request to explicitly signal that a request has zero bytes. 10 | // An alternative, however, is to simply set Request.Body to nil. 11 | // 12 | // Copy of Go 1.8 NoBody type from net/http/http.go 13 | type noBody struct{} 14 | 15 | func (noBody) Read([]byte) (int, error) { return 0, io.EOF } 16 | func (noBody) Close() error { return nil } 17 | func (noBody) WriteTo(io.Writer) (int64, error) { return 0, nil } 18 | 19 | // Is an empty reader that will trigger the Go HTTP client to not include 20 | // and body in the HTTP request. 21 | var noBodyReader = noBody{} 22 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/pkg/idtools/idtools_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package idtools 4 | 5 | import ( 6 | "os" 7 | 8 | "github.com/docker/docker/pkg/system" 9 | ) 10 | 11 | // Platforms such as Windows do not support the UID/GID concept. So make this 12 | // just a wrapper around system.MkdirAll. 13 | func mkdirAs(path string, mode os.FileMode, ownerUID, ownerGID int, mkAll, chownExisting bool) error { 14 | if err := system.MkdirAll(path, mode); err != nil && !os.IsExist(err) { 15 | return err 16 | } 17 | return nil 18 | } 19 | 20 | // CanAccess takes a valid (existing) directory and a uid, gid pair and determines 21 | // if that uid, gid pair has access (execute bit) to the directory 22 | // Windows does not require/support this function, so always return true 23 | func CanAccess(path string, uid, gid int) bool { 24 | return true 25 | } 26 | -------------------------------------------------------------------------------- /misc/pause-container/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | # not use this file except in compliance with the License. A copy of the 5 | # License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is distributed 10 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | # express or implied. See the License for the specific language governing 12 | # permissions and limitations under the License. 13 | 14 | .PHONY: all container clean 15 | 16 | 17 | IMAGE = "amazon/amazon-ecs-pause" 18 | TAG = 0.1.0 19 | 20 | all: container 21 | 22 | container: 23 | docker build -t "$(IMAGE):$(TAG)" . 24 | 25 | clean: 26 | docker rmi "$(IMAGE):$(TAG)" 27 | -------------------------------------------------------------------------------- /agent/acs/handler/error.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | // not use this file except in compliance with the License. A copy of the 5 | // License is located at 6 | // 7 | // http://aws.amazon.com/apache2.0/ 8 | // 9 | // or in the "license" file accompanying this file. This file is distributed 10 | // on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | // express or implied. See the License for the specific language governing 12 | // permissions and limitations under the License. 13 | 14 | package handler 15 | 16 | type UnrecognizedTaskError struct { 17 | err error 18 | } 19 | 20 | func (err UnrecognizedTaskError) Error() string { 21 | return "UnrecogniedTaskError: Error loading task - " + err.err.Error() 22 | } 23 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/unix/asm_linux_mipsx.s: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux 6 | // +build mips mipsle 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // 12 | // System calls for mips, Linux 13 | // 14 | 15 | // Just jump to package syscall's implementation for all these functions. 16 | // The runtime may know about them. 17 | 18 | TEXT ·Syscall(SB),NOSPLIT,$0-28 19 | JMP syscall·Syscall(SB) 20 | 21 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 22 | JMP syscall·Syscall6(SB) 23 | 24 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 25 | JMP syscall·Syscall9(SB) 26 | 27 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 28 | JMP syscall·RawSyscall(SB) 29 | 30 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 31 | JMP syscall·RawSyscall6(SB) 32 | -------------------------------------------------------------------------------- /misc/image-cleanup-test-images/linux0.dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2014-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | # not use this file except in compliance with the License. A copy of the 5 | # License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is distributed 10 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | # express or implied. See the License for the specific language governing 12 | # permissions and limitations under the License. 13 | FROM busybox@sha256:5551dbdfc48d66734d0f01cafee0952cb6e8eeecd1e2492240bf2fd9640c2279 14 | 15 | MAINTAINER Amazon Web Services, Inc. 16 | 17 | RUN date > boo.txt 18 | 19 | ENTRYPOINT ["sh","-c"] 20 | 21 | CMD ["sleep 5"] 22 | -------------------------------------------------------------------------------- /misc/image-cleanup-test-images/linux1.dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2014-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | # not use this file except in compliance with the License. A copy of the 5 | # License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is distributed 10 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | # express or implied. See the License for the specific language governing 12 | # permissions and limitations under the License. 13 | FROM busybox@sha256:5551dbdfc48d66734d0f01cafee0952cb6e8eeecd1e2492240bf2fd9640c2279 14 | 15 | MAINTAINER Amazon Web Services, Inc. 16 | 17 | RUN date > foo.txt 18 | 19 | ENTRYPOINT ["sh","-c"] 20 | 21 | CMD ["sleep 5"] 22 | -------------------------------------------------------------------------------- /misc/image-cleanup-test-images/linux2.dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2014-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | # not use this file except in compliance with the License. A copy of the 5 | # License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is distributed 10 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | # express or implied. See the License for the specific language governing 12 | # permissions and limitations under the License. 13 | FROM busybox@sha256:5551dbdfc48d66734d0f01cafee0952cb6e8eeecd1e2492240bf2fd9640c2279 14 | 15 | MAINTAINER Amazon Web Services, Inc. 16 | 17 | RUN date > roo.txt 18 | 19 | ENTRYPOINT ["sh","-c"] 20 | 21 | CMD ["sleep 5"] 22 | -------------------------------------------------------------------------------- /scripts/create-amazon-ecs-scratch: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Create a scratch-like image that contains data/directories the agent expects 4 | # to exist. Currently there are no directories actually required here. 5 | # Potentially the '/data' directory could be included, but it's desireable to 6 | # fail fast when that directory doesn't exist so not including it forces it to 7 | # be volume mounted. 8 | # TODO, move the cert-inclusion process into this step 9 | 10 | mkdir amazon-ecs-scratch # include other directories that are needed here 11 | mkdir amazon-ecs-scratch/tmp 12 | mkdir amazon-ecs-scratch/images 13 | mkdir amazon-ecs-scratch/amazon-ecs-cni-plugins 14 | 15 | cd amazon-ecs-scratch 16 | tar -cv . | docker import - "amazon/amazon-ecs-scratch:make" 17 | cd .. 18 | rmdir amazon-ecs-scratch/tmp amazon-ecs-scratch/images amazon-ecs-scratch/amazon-ecs-cni-plugins amazon-ecs-scratch 19 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/pkg/system/chtimes_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package system 4 | 5 | import ( 6 | "syscall" 7 | "time" 8 | ) 9 | 10 | //setCTime will set the create time on a file. On Windows, this requires 11 | //calling SetFileTime and explicitly including the create time. 12 | func setCTime(path string, ctime time.Time) error { 13 | ctimespec := syscall.NsecToTimespec(ctime.UnixNano()) 14 | pathp, e := syscall.UTF16PtrFromString(path) 15 | if e != nil { 16 | return e 17 | } 18 | h, e := syscall.CreateFile(pathp, 19 | syscall.FILE_WRITE_ATTRIBUTES, syscall.FILE_SHARE_WRITE, nil, 20 | syscall.OPEN_EXISTING, syscall.FILE_FLAG_BACKUP_SEMANTICS, 0) 21 | if e != nil { 22 | return e 23 | } 24 | defer syscall.Close(h) 25 | c := syscall.NsecToFiletime(syscall.TimespecToNsec(ctimespec)) 26 | return syscall.SetFileTime(h, &c, nil, nil) 27 | } 28 | -------------------------------------------------------------------------------- /agent/vendor/github.com/vishvananda/netlink/Makefile: -------------------------------------------------------------------------------- 1 | DIRS := \ 2 | . \ 3 | nl 4 | 5 | DEPS = \ 6 | github.com/vishvananda/netns 7 | 8 | uniq = $(if $1,$(firstword $1) $(call uniq,$(filter-out $(firstword $1),$1))) 9 | testdirs = $(call uniq,$(foreach d,$(1),$(dir $(wildcard $(d)/*_test.go)))) 10 | goroot = $(addprefix ../../../,$(1)) 11 | unroot = $(subst ../../../,,$(1)) 12 | fmt = $(addprefix fmt-,$(1)) 13 | 14 | all: test 15 | 16 | $(call goroot,$(DEPS)): 17 | go get $(call unroot,$@) 18 | 19 | .PHONY: $(call testdirs,$(DIRS)) 20 | $(call testdirs,$(DIRS)): 21 | sudo -E go test -test.parallel 4 -timeout 60s -v github.com/vishvananda/netlink/$@ 22 | 23 | $(call fmt,$(call testdirs,$(DIRS))): 24 | ! gofmt -l $(subst fmt-,,$@)/*.go | grep -q . 25 | 26 | .PHONY: fmt 27 | fmt: $(call fmt,$(call testdirs,$(DIRS))) 28 | 29 | test: fmt $(call goroot,$(DEPS)) $(call testdirs,$(DIRS)) 30 | -------------------------------------------------------------------------------- /agent/vendor/golang.org/x/sys/unix/flock.go: -------------------------------------------------------------------------------- 1 | // +build linux darwin freebsd openbsd netbsd dragonfly 2 | 3 | // Copyright 2014 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // +build darwin dragonfly freebsd linux netbsd openbsd 8 | 9 | package unix 10 | 11 | import "unsafe" 12 | 13 | // fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux 14 | // systems by flock_linux_32bit.go to be SYS_FCNTL64. 15 | var fcntl64Syscall uintptr = SYS_FCNTL 16 | 17 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 18 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 19 | _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk))) 20 | if errno == 0 { 21 | return nil 22 | } 23 | return errno 24 | } 25 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/pkg/system/utimes_linux.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import ( 4 | "syscall" 5 | "unsafe" 6 | ) 7 | 8 | // LUtimesNano is used to change access and modification time of the specified path. 9 | // It's used for symbol link file because syscall.UtimesNano doesn't support a NOFOLLOW flag atm. 10 | func LUtimesNano(path string, ts []syscall.Timespec) error { 11 | // These are not currently available in syscall 12 | atFdCwd := -100 13 | atSymLinkNoFollow := 0x100 14 | 15 | var _path *byte 16 | _path, err := syscall.BytePtrFromString(path) 17 | if err != nil { 18 | return err 19 | } 20 | 21 | if _, _, err := syscall.Syscall6(syscall.SYS_UTIMENSAT, uintptr(atFdCwd), uintptr(unsafe.Pointer(_path)), uintptr(unsafe.Pointer(&ts[0])), uintptr(atSymLinkNoFollow), 0, 0); err != 0 && err != syscall.ENOSYS { 22 | return err 23 | } 24 | 25 | return nil 26 | } 27 | -------------------------------------------------------------------------------- /agent/vendor/github.com/docker/docker/pkg/term/term_unix.go: -------------------------------------------------------------------------------- 1 | // +build !solaris,!windows 2 | 3 | package term 4 | 5 | import ( 6 | "syscall" 7 | "unsafe" 8 | ) 9 | 10 | // GetWinsize returns the window size based on the specified file descriptor. 11 | func GetWinsize(fd uintptr) (*Winsize, error) { 12 | ws := &Winsize{} 13 | _, _, err := syscall.Syscall(syscall.SYS_IOCTL, fd, uintptr(syscall.TIOCGWINSZ), uintptr(unsafe.Pointer(ws))) 14 | // Skipp errno = 0 15 | if err == 0 { 16 | return ws, nil 17 | } 18 | return ws, err 19 | } 20 | 21 | // SetWinsize tries to set the specified window size for the specified file descriptor. 22 | func SetWinsize(fd uintptr, ws *Winsize) error { 23 | _, _, err := syscall.Syscall(syscall.SYS_IOCTL, fd, uintptr(syscall.TIOCSWINSZ), uintptr(unsafe.Pointer(ws))) 24 | // Skipp errno = 0 25 | if err == 0 { 26 | return nil 27 | } 28 | return err 29 | } 30 | -------------------------------------------------------------------------------- /misc/image-cleanup-test-images/windows0.dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2014-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | # not use this file except in compliance with the License. A copy of the 5 | # License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is distributed 10 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | # express or implied. See the License for the specific language governing 12 | # permissions and limitations under the License. 13 | FROM microsoft/windowsservercore:latest 14 | 15 | MAINTAINER Amazon Web Services, Inc. 16 | 17 | SHELL ["powershell", "-command"] 18 | ENTRYPOINT ["powershell","-command"] 19 | CMD ["Start-Sleep -s 20"] 20 | 21 | RUN echo 1 > image.txt 22 | -------------------------------------------------------------------------------- /misc/image-cleanup-test-images/windows1.dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2014-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | # not use this file except in compliance with the License. A copy of the 5 | # License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is distributed 10 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | # express or implied. See the License for the specific language governing 12 | # permissions and limitations under the License. 13 | FROM microsoft/windowsservercore:latest 14 | 15 | MAINTAINER Amazon Web Services, Inc. 16 | 17 | SHELL ["powershell", "-command"] 18 | ENTRYPOINT ["powershell","-command"] 19 | CMD ["Start-Sleep -s 20"] 20 | 21 | RUN echo 2 > image.txt 22 | -------------------------------------------------------------------------------- /misc/image-cleanup-test-images/windows2.dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2014-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | # not use this file except in compliance with the License. A copy of the 5 | # License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is distributed 10 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | # express or implied. See the License for the specific language governing 12 | # permissions and limitations under the License. 13 | FROM microsoft/windowsservercore:latest 14 | 15 | MAINTAINER Amazon Web Services, Inc. 16 | 17 | SHELL ["powershell", "-command"] 18 | ENTRYPOINT ["powershell","-command"] 19 | CMD ["Start-Sleep -s 20"] 20 | 21 | RUN echo 3 > image.txt 22 | -------------------------------------------------------------------------------- /misc/image-cleanup-test-images/windows3.dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2014-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | # not use this file except in compliance with the License. A copy of the 5 | # License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is distributed 10 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | # express or implied. See the License for the specific language governing 12 | # permissions and limitations under the License. 13 | FROM microsoft/windowsservercore:latest 14 | 15 | MAINTAINER Amazon Web Services, Inc. 16 | 17 | SHELL ["powershell", "-command"] 18 | ENTRYPOINT ["powershell","-command"] 19 | CMD ["Start-Sleep -s 20"] 20 | 21 | RUN echo 4 > image.txt 22 | -------------------------------------------------------------------------------- /misc/image-cleanup-test-images/windows4.dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2014-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | # not use this file except in compliance with the License. A copy of the 5 | # License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is distributed 10 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | # express or implied. See the License for the specific language governing 12 | # permissions and limitations under the License. 13 | FROM microsoft/windowsservercore:latest 14 | 15 | MAINTAINER Amazon Web Services, Inc. 16 | 17 | SHELL ["powershell", "-command"] 18 | ENTRYPOINT ["powershell","-command"] 19 | CMD ["Start-Sleep -s 20"] 20 | 21 | RUN echo 5 > image.txt 22 | -------------------------------------------------------------------------------- /misc/image-cleanup-test-images/windows5.dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2014-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | # not use this file except in compliance with the License. A copy of the 5 | # License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is distributed 10 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | # express or implied. See the License for the specific language governing 12 | # permissions and limitations under the License. 13 | FROM microsoft/windowsservercore:latest 14 | 15 | MAINTAINER Amazon Web Services, Inc. 16 | 17 | SHELL ["powershell", "-command"] 18 | ENTRYPOINT ["powershell","-command"] 19 | CMD ["Start-Sleep -s 20"] 20 | 21 | RUN echo 6 > image.txt 22 | -------------------------------------------------------------------------------- /misc/image-cleanup-test-images/windows6.dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2014-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You may 4 | # not use this file except in compliance with the License. A copy of the 5 | # License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is distributed 10 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | # express or implied. See the License for the specific language governing 12 | # permissions and limitations under the License. 13 | FROM microsoft/windowsservercore:latest 14 | 15 | MAINTAINER Amazon Web Services, Inc. 16 | 17 | SHELL ["powershell", "-command"] 18 | ENTRYPOINT ["powershell","-command"] 19 | CMD ["Start-Sleep -s 20"] 20 | 21 | RUN echo 7 > image.txt 22 | --------------------------------------------------------------------------------