├── .gitignore ├── vendor └── github.com │ ├── google │ └── cadvisor │ │ ├── version │ │ └── VERSION │ │ ├── Godeps │ │ ├── _workspace │ │ │ ├── .gitignore │ │ │ └── src │ │ │ │ ├── github.com │ │ │ │ ├── Sirupsen │ │ │ │ │ └── logrus │ │ │ │ │ │ ├── .gitignore │ │ │ │ │ │ ├── .travis.yml │ │ │ │ │ │ ├── terminal_openbsd.go │ │ │ │ │ │ ├── CHANGELOG.md │ │ │ │ │ │ ├── terminal_linux.go │ │ │ │ │ │ ├── terminal_darwin.go │ │ │ │ │ │ ├── terminal_freebsd.go │ │ │ │ │ │ ├── hooks │ │ │ │ │ │ └── syslog │ │ │ │ │ │ │ └── README.md │ │ │ │ │ │ ├── terminal_notwindows.go │ │ │ │ │ │ ├── writer.go │ │ │ │ │ │ ├── terminal_windows.go │ │ │ │ │ │ └── examples │ │ │ │ │ │ └── hook │ │ │ │ │ │ └── hook.go │ │ │ │ ├── mistifyio │ │ │ │ │ └── go-zfs │ │ │ │ │ │ ├── .gitignore │ │ │ │ │ │ └── error.go │ │ │ │ ├── prometheus │ │ │ │ │ ├── procfs │ │ │ │ │ │ ├── fixtures │ │ │ │ │ │ │ ├── 584 │ │ │ │ │ │ │ │ └── stat │ │ │ │ │ │ │ └── 26231 │ │ │ │ │ │ │ │ ├── fd │ │ │ │ │ │ │ │ ├── 0 │ │ │ │ │ │ │ │ ├── 1 │ │ │ │ │ │ │ │ ├── 2 │ │ │ │ │ │ │ │ ├── 3 │ │ │ │ │ │ │ │ └── 4 │ │ │ │ │ │ │ │ ├── cmdline │ │ │ │ │ │ │ │ └── stat │ │ │ │ │ │ ├── NOTICE │ │ │ │ │ │ ├── AUTHORS.md │ │ │ │ │ │ └── README.md │ │ │ │ │ ├── common │ │ │ │ │ │ ├── expfmt │ │ │ │ │ │ │ └── fuzz │ │ │ │ │ │ │ │ └── corpus │ │ │ │ │ │ │ │ ├── minimal │ │ │ │ │ │ │ │ ├── from_test_parse_0 │ │ │ │ │ │ │ │ ├── from_test_parse_error_0 │ │ │ │ │ │ │ │ ├── from_test_parse_error_18 │ │ │ │ │ │ │ │ ├── from_test_parse_error_3 │ │ │ │ │ │ │ │ ├── from_test_parse_error_1 │ │ │ │ │ │ │ │ ├── from_test_parse_error_16 │ │ │ │ │ │ │ │ ├── from_test_parse_error_5 │ │ │ │ │ │ │ │ ├── from_test_parse_error_6 │ │ │ │ │ │ │ │ ├── from_test_parse_error_8 │ │ │ │ │ │ │ │ ├── from_test_parse_error_11 │ │ │ │ │ │ │ │ ├── from_test_parse_error_15 │ │ │ │ │ │ │ │ ├── from_test_parse_error_4 │ │ │ │ │ │ │ │ ├── from_test_parse_error_10 │ │ │ │ │ │ │ │ ├── from_test_parse_error_17 │ │ │ │ │ │ │ │ ├── from_test_parse_error_9 │ │ │ │ │ │ │ │ ├── from_test_parse_error_2 │ │ │ │ │ │ │ │ ├── from_test_parse_error_12 │ │ │ │ │ │ │ │ ├── from_test_parse_error_14 │ │ │ │ │ │ │ │ ├── from_test_parse_error_13 │ │ │ │ │ │ │ │ ├── from_test_parse_error_7 │ │ │ │ │ │ │ │ ├── from_test_parse_error_19 │ │ │ │ │ │ │ │ ├── from_test_parse_1 │ │ │ │ │ │ │ │ ├── from_test_parse_2 │ │ │ │ │ │ │ │ ├── from_test_parse_4 │ │ │ │ │ │ │ │ └── from_test_parse_3 │ │ │ │ │ │ └── model │ │ │ │ │ │ │ └── model.go │ │ │ │ │ ├── client_golang │ │ │ │ │ │ └── prometheus │ │ │ │ │ │ │ └── .gitignore │ │ │ │ │ └── client_model │ │ │ │ │ │ └── NOTICE │ │ │ │ ├── fsouza │ │ │ │ │ └── go-dockerclient │ │ │ │ │ │ ├── testing │ │ │ │ │ │ └── data │ │ │ │ │ │ │ ├── barfile │ │ │ │ │ │ │ ├── foofile │ │ │ │ │ │ │ ├── .dockerignore │ │ │ │ │ │ │ └── Dockerfile │ │ │ │ │ │ ├── .gitignore │ │ │ │ │ │ ├── external │ │ │ │ │ │ └── github.com │ │ │ │ │ │ │ ├── docker │ │ │ │ │ │ │ ├── docker │ │ │ │ │ │ │ │ ├── pkg │ │ │ │ │ │ │ │ │ ├── archive │ │ │ │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ │ │ │ ├── copy_windows.go │ │ │ │ │ │ │ │ │ │ ├── copy_unix.go │ │ │ │ │ │ │ │ │ │ ├── time_unsupported.go │ │ │ │ │ │ │ │ │ │ ├── time_linux.go │ │ │ │ │ │ │ │ │ │ └── changes_windows.go │ │ │ │ │ │ │ │ │ ├── ioutils │ │ │ │ │ │ │ │ │ │ ├── scheduler.go │ │ │ │ │ │ │ │ │ │ ├── fmt.go │ │ │ │ │ │ │ │ │ │ └── scheduler_gccgo.go │ │ │ │ │ │ │ │ │ ├── system │ │ │ │ │ │ │ │ │ │ ├── meminfo_unsupported.go │ │ │ │ │ │ │ │ │ │ ├── errors.go │ │ │ │ │ │ │ │ │ │ ├── filesys.go │ │ │ │ │ │ │ │ │ │ ├── umask.go │ │ │ │ │ │ │ │ │ │ ├── umask_windows.go │ │ │ │ │ │ │ │ │ │ ├── mknod_windows.go │ │ │ │ │ │ │ │ │ │ ├── utimes_darwin.go │ │ │ │ │ │ │ │ │ │ ├── xattrs_unsupported.go │ │ │ │ │ │ │ │ │ │ ├── utimes_unsupported.go │ │ │ │ │ │ │ │ │ │ ├── stat_unsupported.go │ │ │ │ │ │ │ │ │ │ ├── lstat.go │ │ │ │ │ │ │ │ │ │ ├── meminfo.go │ │ │ │ │ │ │ │ │ │ ├── stat_windows.go │ │ │ │ │ │ │ │ │ │ ├── utimes_freebsd.go │ │ │ │ │ │ │ │ │ │ ├── mknod.go │ │ │ │ │ │ │ │ │ │ ├── stat_freebsd.go │ │ │ │ │ │ │ │ │ │ ├── lstat_windows.go │ │ │ │ │ │ │ │ │ │ └── utimes_linux.go │ │ │ │ │ │ │ │ │ └── promise │ │ │ │ │ │ │ │ │ │ └── promise.go │ │ │ │ │ │ │ │ └── opts │ │ │ │ │ │ │ │ │ ├── hosts_unix.go │ │ │ │ │ │ │ │ │ ├── hosts_windows.go │ │ │ │ │ │ │ │ │ └── ip.go │ │ │ │ │ │ │ └── libcontainer │ │ │ │ │ │ │ │ └── user │ │ │ │ │ │ │ │ ├── MAINTAINERS │ │ │ │ │ │ │ │ ├── lookup_unsupported.go │ │ │ │ │ │ │ │ └── lookup_unix.go │ │ │ │ │ │ │ ├── opencontainers │ │ │ │ │ │ │ └── runc │ │ │ │ │ │ │ │ └── libcontainer │ │ │ │ │ │ │ │ └── user │ │ │ │ │ │ │ │ ├── MAINTAINERS │ │ │ │ │ │ │ │ ├── lookup_unsupported.go │ │ │ │ │ │ │ │ └── lookup_unix.go │ │ │ │ │ │ │ ├── Sirupsen │ │ │ │ │ │ │ └── logrus │ │ │ │ │ │ │ │ ├── terminal_openbsd.go │ │ │ │ │ │ │ │ ├── terminal_bsd.go │ │ │ │ │ │ │ │ ├── terminal_linux.go │ │ │ │ │ │ │ │ ├── terminal_freebsd.go │ │ │ │ │ │ │ │ ├── CHANGELOG.md │ │ │ │ │ │ │ │ ├── terminal_notwindows.go │ │ │ │ │ │ │ │ ├── writer.go │ │ │ │ │ │ │ │ └── terminal_windows.go │ │ │ │ │ │ │ └── gorilla │ │ │ │ │ │ │ └── context │ │ │ │ │ │ │ └── README.md │ │ │ │ │ │ ├── .travis.yml │ │ │ │ │ │ └── DOCKER-LICENSE │ │ │ │ ├── pborman │ │ │ │ │ └── uuid │ │ │ │ │ │ ├── CONTRIBUTORS │ │ │ │ │ │ ├── doc.go │ │ │ │ │ │ └── json.go │ │ │ │ ├── kr │ │ │ │ │ ├── pretty │ │ │ │ │ │ ├── .gitignore │ │ │ │ │ │ └── Readme │ │ │ │ │ └── text │ │ │ │ │ │ ├── doc.go │ │ │ │ │ │ ├── Readme │ │ │ │ │ │ ├── colwriter │ │ │ │ │ │ └── Readme │ │ │ │ │ │ └── mc │ │ │ │ │ │ └── Readme │ │ │ │ ├── abbot │ │ │ │ │ └── go-http-auth │ │ │ │ │ │ ├── .gitignore │ │ │ │ │ │ ├── test.htdigest │ │ │ │ │ │ ├── test.htpasswd │ │ │ │ │ │ ├── Makefile │ │ │ │ │ │ ├── misc.go │ │ │ │ │ │ └── examples │ │ │ │ │ │ ├── basic.go │ │ │ │ │ │ └── digest.go │ │ │ │ ├── Shopify │ │ │ │ │ └── sarama │ │ │ │ │ │ ├── examples │ │ │ │ │ │ └── http_server │ │ │ │ │ │ │ └── .gitignore │ │ │ │ │ │ ├── tools │ │ │ │ │ │ ├── kafka-console-consumer │ │ │ │ │ │ │ └── .gitignore │ │ │ │ │ │ ├── kafka-console-producer │ │ │ │ │ │ │ └── .gitignore │ │ │ │ │ │ ├── kafka-console-partitionconsumer │ │ │ │ │ │ │ └── .gitignore │ │ │ │ │ │ └── README.md │ │ │ │ │ │ ├── vagrant │ │ │ │ │ │ ├── toxiproxy.conf │ │ │ │ │ │ ├── zookeeper.conf │ │ │ │ │ │ ├── kafka.conf │ │ │ │ │ │ ├── provision.sh │ │ │ │ │ │ └── create_topics.sh │ │ │ │ │ │ ├── .gitignore │ │ │ │ │ │ ├── list_groups_request.go │ │ │ │ │ │ ├── heartbeat_response.go │ │ │ │ │ │ ├── leave_group_response.go │ │ │ │ │ │ ├── Makefile │ │ │ │ │ │ ├── response_header.go │ │ │ │ │ │ ├── Vagrantfile │ │ │ │ │ │ ├── consumer_metadata_request.go │ │ │ │ │ │ ├── sync_group_response.go │ │ │ │ │ │ ├── describe_groups_request.go │ │ │ │ │ │ ├── .travis.yml │ │ │ │ │ │ ├── leave_group_request.go │ │ │ │ │ │ ├── length_field.go │ │ │ │ │ │ └── mocks │ │ │ │ │ │ └── README.md │ │ │ │ ├── jmespath │ │ │ │ │ └── go-jmespath │ │ │ │ │ │ ├── .gitignore │ │ │ │ │ │ ├── .travis.yml │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── fuzz │ │ │ │ │ │ └── jmespath.go │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ ├── compliance │ │ │ │ │ │ └── current.json │ │ │ │ │ │ ├── toktype_string.go │ │ │ │ │ │ └── astnodetype_string.go │ │ │ │ ├── opencontainers │ │ │ │ │ └── runc │ │ │ │ │ │ ├── libcontainer │ │ │ │ │ │ ├── cgroups │ │ │ │ │ │ │ ├── fs │ │ │ │ │ │ │ │ ├── fs_unsupported.go │ │ │ │ │ │ │ │ └── name.go │ │ │ │ │ │ │ └── cgroups_unsupported.go │ │ │ │ │ │ ├── criurpc │ │ │ │ │ │ │ └── Makefile │ │ │ │ │ │ ├── devices │ │ │ │ │ │ │ └── devices_unsupported.go │ │ │ │ │ │ ├── nsenter │ │ │ │ │ │ │ ├── nsenter_unsupported.go │ │ │ │ │ │ │ ├── nsenter.go │ │ │ │ │ │ │ └── nsenter_gccgo.go │ │ │ │ │ │ ├── stacktrace │ │ │ │ │ │ │ ├── stacktrace.go │ │ │ │ │ │ │ └── capture.go │ │ │ │ │ │ ├── configs │ │ │ │ │ │ │ ├── namespaces.go │ │ │ │ │ │ │ ├── cgroup_unsupported.go │ │ │ │ │ │ │ ├── cgroup_windows.go │ │ │ │ │ │ │ ├── hugepage_limit.go │ │ │ │ │ │ │ ├── namespaces_unsupported.go │ │ │ │ │ │ │ ├── interface_priority_map.go │ │ │ │ │ │ │ ├── namespaces_syscall_unsupported.go │ │ │ │ │ │ │ └── namespaces_syscall.go │ │ │ │ │ │ ├── integration │ │ │ │ │ │ │ └── doc.go │ │ │ │ │ │ ├── stats_freebsd.go │ │ │ │ │ │ ├── stats_windows.go │ │ │ │ │ │ ├── user │ │ │ │ │ │ │ ├── MAINTAINERS │ │ │ │ │ │ │ ├── lookup_unsupported.go │ │ │ │ │ │ │ └── lookup_unix.go │ │ │ │ │ │ ├── criu_opts_windows.go │ │ │ │ │ │ ├── stats_linux.go │ │ │ │ │ │ ├── xattr │ │ │ │ │ │ │ ├── errors.go │ │ │ │ │ │ │ └── xattr_unsupported.go │ │ │ │ │ │ ├── system │ │ │ │ │ │ │ ├── sysconfig.go │ │ │ │ │ │ │ ├── sysconfig_notcgo.go │ │ │ │ │ │ │ ├── syscall_linux_386.go │ │ │ │ │ │ │ ├── syscall_linux_arm.go │ │ │ │ │ │ │ └── syscall_linux_64.go │ │ │ │ │ │ ├── compat_1.5_linux.go │ │ │ │ │ │ ├── container_nouserns_linux.go │ │ │ │ │ │ ├── stats.go │ │ │ │ │ │ ├── console.go │ │ │ │ │ │ ├── setgroups_linux.go │ │ │ │ │ │ ├── apparmor │ │ │ │ │ │ │ └── apparmor_disabled.go │ │ │ │ │ │ ├── console_freebsd.go │ │ │ │ │ │ ├── container_windows.go │ │ │ │ │ │ ├── seccomp │ │ │ │ │ │ │ └── seccomp_unsupported.go │ │ │ │ │ │ └── console_windows.go │ │ │ │ │ │ └── NOTICE │ │ │ │ ├── eapache │ │ │ │ │ └── queue │ │ │ │ │ │ ├── .travis.yml │ │ │ │ │ │ └── .gitignore │ │ │ │ ├── vishvananda │ │ │ │ │ └── netlink │ │ │ │ │ │ ├── .travis.yml │ │ │ │ │ │ ├── neigh.go │ │ │ │ │ │ └── Makefile │ │ │ │ ├── godbus │ │ │ │ │ └── dbus │ │ │ │ │ │ ├── MAINTAINERS │ │ │ │ │ │ ├── transport_darwin.go │ │ │ │ │ │ ├── homedir_dynamic.go │ │ │ │ │ │ ├── homedir.go │ │ │ │ │ │ ├── conn_darwin.go │ │ │ │ │ │ ├── conn_other.go │ │ │ │ │ │ ├── auth_external.go │ │ │ │ │ │ ├── introspect │ │ │ │ │ │ └── call.go │ │ │ │ │ │ ├── transport_unixcred_linux.go │ │ │ │ │ │ ├── transport_generic.go │ │ │ │ │ │ └── homedir_static.go │ │ │ │ ├── stretchr │ │ │ │ │ ├── objx │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── security.go │ │ │ │ │ │ ├── .gitignore │ │ │ │ │ │ ├── value.go │ │ │ │ │ │ ├── constants.go │ │ │ │ │ │ ├── codegen │ │ │ │ │ │ │ ├── array-access.txt │ │ │ │ │ │ │ └── types_list.txt │ │ │ │ │ │ └── tests.go │ │ │ │ │ └── testify │ │ │ │ │ │ └── assert │ │ │ │ │ │ └── errors.go │ │ │ │ ├── go-ini │ │ │ │ │ └── ini │ │ │ │ │ │ └── .gitignore │ │ │ │ ├── aws │ │ │ │ │ └── aws-sdk-go │ │ │ │ │ │ ├── NOTICE.txt │ │ │ │ │ │ ├── aws │ │ │ │ │ │ ├── version.go │ │ │ │ │ │ ├── credentials │ │ │ │ │ │ │ └── example.ini │ │ │ │ │ │ ├── client │ │ │ │ │ │ │ └── metadata │ │ │ │ │ │ │ │ └── client_info.go │ │ │ │ │ │ └── errors.go │ │ │ │ │ │ └── vendor │ │ │ │ │ │ └── github.com │ │ │ │ │ │ └── jmespath │ │ │ │ │ │ └── go-jmespath │ │ │ │ │ │ └── LICENSE │ │ │ │ ├── klauspost │ │ │ │ │ └── crc32 │ │ │ │ │ │ ├── .travis.yml │ │ │ │ │ │ └── .gitignore │ │ │ │ ├── docker │ │ │ │ │ ├── docker │ │ │ │ │ │ ├── pkg │ │ │ │ │ │ │ ├── symlink │ │ │ │ │ │ │ │ ├── fs_unix.go │ │ │ │ │ │ │ │ └── README.md │ │ │ │ │ │ │ ├── system │ │ │ │ │ │ │ │ ├── utimes_darwin.go │ │ │ │ │ │ │ │ ├── meminfo_unsupported.go │ │ │ │ │ │ │ │ ├── errors.go │ │ │ │ │ │ │ │ ├── umask_windows.go │ │ │ │ │ │ │ │ ├── umask.go │ │ │ │ │ │ │ │ ├── utimes_unsupported.go │ │ │ │ │ │ │ │ ├── mknod_windows.go │ │ │ │ │ │ │ │ ├── stat_unsupported.go │ │ │ │ │ │ │ │ ├── xattrs_unsupported.go │ │ │ │ │ │ │ │ ├── lstat.go │ │ │ │ │ │ │ │ ├── meminfo.go │ │ │ │ │ │ │ │ ├── filesys.go │ │ │ │ │ │ │ │ ├── lstat_windows.go │ │ │ │ │ │ │ │ ├── utimes_freebsd.go │ │ │ │ │ │ │ │ ├── stat_freebsd.go │ │ │ │ │ │ │ │ └── utimes_linux.go │ │ │ │ │ │ │ ├── mount │ │ │ │ │ │ │ │ ├── mounter_unsupported.go │ │ │ │ │ │ │ │ ├── mountinfo_unsupported.go │ │ │ │ │ │ │ │ ├── mounter_linux.go │ │ │ │ │ │ │ │ └── flags_unsupported.go │ │ │ │ │ │ │ └── longpath │ │ │ │ │ │ │ │ └── longpath.go │ │ │ │ │ │ ├── vendor │ │ │ │ │ │ │ └── src │ │ │ │ │ │ │ │ └── github.com │ │ │ │ │ │ │ │ ├── hashicorp │ │ │ │ │ │ │ │ ├── serf │ │ │ │ │ │ │ │ │ └── website │ │ │ │ │ │ │ │ │ │ └── LICENSE.md │ │ │ │ │ │ │ │ └── consul │ │ │ │ │ │ │ │ │ └── website │ │ │ │ │ │ │ │ │ └── LICENSE.md │ │ │ │ │ │ │ │ ├── BurntSushi │ │ │ │ │ │ │ │ └── toml │ │ │ │ │ │ │ │ │ ├── COPYING │ │ │ │ │ │ │ │ │ └── cmd │ │ │ │ │ │ │ │ │ ├── tomlv │ │ │ │ │ │ │ │ │ └── COPYING │ │ │ │ │ │ │ │ │ ├── toml-test-decoder │ │ │ │ │ │ │ │ │ └── COPYING │ │ │ │ │ │ │ │ │ └── toml-test-encoder │ │ │ │ │ │ │ │ │ └── COPYING │ │ │ │ │ │ │ │ └── fluent │ │ │ │ │ │ │ │ └── fluent-logger-golang │ │ │ │ │ │ │ │ └── LICENSE │ │ │ │ │ │ └── NOTICE │ │ │ │ │ └── go-units │ │ │ │ │ │ └── circle.yml │ │ │ │ ├── golang │ │ │ │ │ └── snappy │ │ │ │ │ │ ├── README │ │ │ │ │ │ └── AUTHORS │ │ │ │ ├── SeanDolphin │ │ │ │ │ └── bqschema │ │ │ │ │ │ ├── .travis.yml │ │ │ │ │ │ └── .gitignore │ │ │ │ ├── syndtr │ │ │ │ │ └── gocapability │ │ │ │ │ │ └── capability │ │ │ │ │ │ └── capability_noop.go │ │ │ │ ├── influxdb │ │ │ │ │ └── influxdb │ │ │ │ │ │ └── pkg │ │ │ │ │ │ └── escape │ │ │ │ │ │ ├── strings.go │ │ │ │ │ │ └── bytes.go │ │ │ │ └── matttproud │ │ │ │ │ └── golang_protobuf_extensions │ │ │ │ │ └── pbutil │ │ │ │ │ └── doc.go │ │ │ │ ├── golang.org │ │ │ │ └── x │ │ │ │ │ ├── oauth2 │ │ │ │ │ ├── AUTHORS │ │ │ │ │ ├── CONTRIBUTORS │ │ │ │ │ ├── .travis.yml │ │ │ │ │ ├── google │ │ │ │ │ │ └── appengine_hook.go │ │ │ │ │ ├── vk │ │ │ │ │ │ └── vk.go │ │ │ │ │ ├── github │ │ │ │ │ │ └── github.go │ │ │ │ │ ├── facebook │ │ │ │ │ │ └── facebook.go │ │ │ │ │ ├── linkedin │ │ │ │ │ │ └── linkedin.go │ │ │ │ │ ├── odnoklassniki │ │ │ │ │ │ └── odnoklassniki.go │ │ │ │ │ └── client_appengine.go │ │ │ │ │ └── net │ │ │ │ │ └── context │ │ │ │ │ └── ctxhttp │ │ │ │ │ ├── cancelreq.go │ │ │ │ │ └── cancelreq_go14.go │ │ │ │ ├── bitbucket.org │ │ │ │ └── ww │ │ │ │ │ └── goautoneg │ │ │ │ │ └── Makefile │ │ │ │ ├── gopkg.in │ │ │ │ └── olivere │ │ │ │ │ └── elastic.v2 │ │ │ │ │ ├── filter.go │ │ │ │ │ ├── uritemplates │ │ │ │ │ └── utils.go │ │ │ │ │ ├── cluster-test │ │ │ │ │ └── Makefile │ │ │ │ │ ├── suggester_context.go │ │ │ │ │ ├── search_facets.go │ │ │ │ │ ├── bulk_request.go │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── query.go │ │ │ │ │ ├── .travis.yml │ │ │ │ │ ├── suggester.go │ │ │ │ │ └── search_filters_match_all.go │ │ │ │ └── google.golang.org │ │ │ │ └── api │ │ │ │ └── googleapi │ │ │ │ └── internal │ │ │ │ └── uritemplates │ │ │ │ └── utils.go │ │ └── Readme │ │ ├── test.htpasswd │ │ ├── test.htdigest │ │ ├── logo.png │ │ ├── integration │ │ ├── runner │ │ │ └── retrywhitelist.txt │ │ └── tests │ │ │ ├── TODO.md │ │ │ └── healthz │ │ │ └── test_utils.go │ │ ├── collector │ │ └── config │ │ │ ├── sample_config_prometheus.json │ │ │ └── sample_config_prometheus_filtered.json │ │ ├── docs │ │ ├── development │ │ │ ├── README.md │ │ │ └── integration_testing.md │ │ ├── clients.md │ │ ├── deploy.md │ │ └── prometheus.md │ │ ├── .travis.yml │ │ ├── AUTHORS │ │ ├── deploy │ │ ├── canary │ │ │ └── Dockerfile │ │ └── build.sh │ │ ├── build │ │ └── boilerplate │ │ │ ├── boilerplate.sh.txt │ │ │ ├── boilerplate.go.txt │ │ │ └── boilerplate.py.txt │ │ ├── container │ │ └── libcontainer │ │ │ └── testdata │ │ │ └── procnetdev │ │ └── utils │ │ ├── path.go │ │ ├── procfs │ │ └── doc.go │ │ └── cpuload │ │ └── netlink │ │ └── defs.go │ ├── shirou │ └── gopsutil │ │ ├── doc.go │ │ ├── internal │ │ └── common │ │ │ └── common_linux.go │ │ ├── process │ │ ├── expected │ │ │ └── darwin │ │ │ │ └── %2Fbin%2Fps-ax-opid_fail │ │ ├── process_linux_386.go │ │ ├── process_linux_arm.go │ │ ├── process_linux_amd64.go │ │ ├── process_posix_test.go │ │ ├── process_windows_386.go │ │ └── process_windows_amd64.go │ │ ├── host │ │ ├── types_darwin.go │ │ ├── host_darwin_amd64.go │ │ ├── types_linux.go │ │ ├── host_freebsd_386.go │ │ ├── types_freebsd.go │ │ └── host_freebsd_amd64.go │ │ ├── cpu │ │ └── cpu_darwin_nocgo.go │ │ ├── load │ │ ├── load_windows.go │ │ └── load.go │ │ ├── circle.yml │ │ ├── coverall.sh │ │ ├── mktypes.sh │ │ ├── windows_memo.rst │ │ └── Makefile │ ├── urfave │ └── cli │ │ ├── autocomplete │ │ ├── zsh_autocomplete │ │ └── bash_autocomplete │ │ ├── altsrc │ │ ├── helpers_test.go │ │ └── input_source_context.go │ │ ├── appveyor.yml │ │ ├── .travis.yml │ │ ├── cli.go │ │ └── helpers_test.go │ └── rancher │ └── go-rancher-metadata │ ├── metadata │ ├── utils.go │ └── change.go │ └── main.go ├── Dockerfile ├── images ├── haproxy-cadvisor │ ├── Dockerfile │ ├── build.sh │ └── haproxy.cfg ├── haproxy-tomcat │ ├── Dockerfile │ ├── build.sh │ └── haproxy.cfg └── etcd │ └── Dockerfile ├── templates ├── cadvisor-proxy │ ├── 0 │ │ ├── rancher-compose.yml │ │ └── docker-compose.yml │ ├── config.yml │ └── catalogIcon-cadvisor-proxy.png ├── etcd │ ├── 0 │ │ └── rancher-compose.yml │ └── config.yml ├── autoscaling │ ├── 0 │ │ └── docker-compose.yml │ └── config.yml └── tomcat │ └── 0 │ ├── docker-compose.yml │ └── rancher-compose.yml ├── main.go └── Dockerfile.build /.gitignore: -------------------------------------------------------------------------------- 1 | rancher-autoscale 2 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/version/VERSION: -------------------------------------------------------------------------------- 1 | 0.22.0 -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/doc.go: -------------------------------------------------------------------------------- 1 | package gopsutil 2 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/.gitignore: -------------------------------------------------------------------------------- 1 | /pkg 2 | /bin 3 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/test.htpasswd: -------------------------------------------------------------------------------- 1 | admin:$apr1$WVO0Bsre$VrmWGDbcBV1fdAkvgQwdk0 2 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/test.htdigest: -------------------------------------------------------------------------------- 1 | admin:localhost:70f2631dded4ce5ad0ebbea5faa6ad6e 2 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Sirupsen/logrus/.gitignore: -------------------------------------------------------------------------------- 1 | logrus 2 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/mistifyio/go-zfs/.gitignore: -------------------------------------------------------------------------------- 1 | .vagrant 2 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/fixtures/26231/fd/0: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/fixtures/26231/fd/1: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/fixtures/26231/fd/2: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/fixtures/26231/fd/3: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/fixtures/26231/fd/4: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/testing/data/barfile: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/testing/data/foofile: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/internal/common/common_linux.go: -------------------------------------------------------------------------------- 1 | // +build linux 2 | 3 | package common 4 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.4 2 | 3 | ADD rancher-autoscale /usr/bin/autoscale 4 | ENTRYPOINT ["/usr/bin/autoscale"] 5 | -------------------------------------------------------------------------------- /images/haproxy-cadvisor/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM haproxy:1.6-alpine 2 | 3 | ADD haproxy.cfg /usr/local/etc/haproxy/haproxy.cfg 4 | -------------------------------------------------------------------------------- /images/haproxy-tomcat/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM haproxy:1.6-alpine 2 | 3 | ADD haproxy.cfg /usr/local/etc/haproxy/haproxy.cfg 4 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/common/expfmt/fuzz/corpus/minimal: -------------------------------------------------------------------------------- 1 | m{} 0 2 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/fixtures/26231/cmdline: -------------------------------------------------------------------------------- 1 | vimtest.go+10 -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/pborman/uuid/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | Paul Borman 2 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/pretty/.gitignore: -------------------------------------------------------------------------------- 1 | [568].out 2 | _go* 3 | _test* 4 | _obj 5 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_0: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_0: -------------------------------------------------------------------------------- 1 | bla 3.14 -------------------------------------------------------------------------------- /templates/cadvisor-proxy/0/rancher-compose.yml: -------------------------------------------------------------------------------- 1 | .catalog: 2 | name: cAdvisor Proxy 3 | version: v0.0.1 4 | minimum_rancher_version: v1.1.0-dev4 -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/abbot/go-http-auth/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *.a 3 | *.6 4 | *.out 5 | _testmain.go 6 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/client_golang/prometheus/.gitignore: -------------------------------------------------------------------------------- 1 | command-line-arguments.test 2 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_18: -------------------------------------------------------------------------------- 1 | {label="bla"} 3.14 2 -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_3: -------------------------------------------------------------------------------- 1 | metric{@="bla"} 3.14 -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLParse/rancher-autoscale/HEAD/vendor/github.com/google/cadvisor/logo.png -------------------------------------------------------------------------------- /templates/cadvisor-proxy/config.yml: -------------------------------------------------------------------------------- 1 | name: cAdvisor Proxy 2 | description: | 3 | Proxy cAdvisor traffic 4 | version: v0.0.1 5 | category: Features 6 | -------------------------------------------------------------------------------- /templates/etcd/config.yml: -------------------------------------------------------------------------------- 1 | name: Etcd 2 | description: | 3 | A highly-available key/value store 4 | version: 2.3.6-rancher1 5 | category: Clustering 6 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Shopify/sarama/examples/http_server/.gitignore: -------------------------------------------------------------------------------- 1 | http_server 2 | http_server.test 3 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/abbot/go-http-auth/test.htdigest: -------------------------------------------------------------------------------- 1 | test:example.com:aa78524fceb0e50fd8ca96dd818b8cf9 2 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_1: -------------------------------------------------------------------------------- 1 | metric{label="\t"} 3.14 -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_16: -------------------------------------------------------------------------------- 1 | 2 | # TYPE met-ric 3 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_5: -------------------------------------------------------------------------------- 1 | metric{label+="bla"} 3.14 -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_6: -------------------------------------------------------------------------------- 1 | metric{label=bla} 3.14 -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_8: -------------------------------------------------------------------------------- 1 | metric{label="bla"+} 3.14 -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_11: -------------------------------------------------------------------------------- 1 | metric{label="bla"} blubb 2 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_15: -------------------------------------------------------------------------------- 1 | 2 | # TYPE metric bla 3 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_4: -------------------------------------------------------------------------------- 1 | metric{__name__="bla"} 3.14 -------------------------------------------------------------------------------- /templates/autoscaling/config.yml: -------------------------------------------------------------------------------- 1 | name: Autoscaling 2 | description: | 3 | Autoscale services by resource usage 4 | version: v0.0.1 5 | category: Features 6 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/.gitignore: -------------------------------------------------------------------------------- 1 | # temporary symlink for testing 2 | testing/data/symlink 3 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/jmespath/go-jmespath/.gitignore: -------------------------------------------------------------------------------- 1 | jpgo 2 | jmespath-fuzz.zip 3 | cpu.out 4 | go-jmespath.test 5 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_10: -------------------------------------------------------------------------------- 1 | metric{label="bla"} 3.14 2 3 2 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_17: -------------------------------------------------------------------------------- 1 | @invalidmetric{label="bla"} 3.14 2 -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_9: -------------------------------------------------------------------------------- 1 | metric{label="bla"} 3.14 2.72 2 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/testing/data/.dockerignore: -------------------------------------------------------------------------------- 1 | container.tar 2 | dockerfile.tar 3 | foofile 4 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/integration/runner/retrywhitelist.txt: -------------------------------------------------------------------------------- 1 | Network tx and rx bytes should not be equal 2 | Network tx and rx packets should not be equal -------------------------------------------------------------------------------- /templates/cadvisor-proxy/catalogIcon-cadvisor-proxy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LLParse/rancher-autoscale/HEAD/templates/cadvisor-proxy/catalogIcon-cadvisor-proxy.png -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/cgroups/fs/fs_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package fs 4 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_2: -------------------------------------------------------------------------------- 1 | 2 | metric{label="new 3 | line"} 3.14 4 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/eapache/queue/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | 4 | go: 5 | - 1.2 6 | - 1.3 7 | - 1.4 8 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/cgroups/cgroups_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package cgroups 4 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/criurpc/Makefile: -------------------------------------------------------------------------------- 1 | gen: criurpc.proto 2 | protoc --go_out=. criurpc.proto 3 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/devices/devices_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package devices 4 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_12: -------------------------------------------------------------------------------- 1 | 2 | # HELP metric one 3 | # HELP metric two 4 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_14: -------------------------------------------------------------------------------- 1 | 2 | metric 4.12 3 | # TYPE metric counter 4 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/vishvananda/netlink/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | install: 3 | - go get github.com/vishvananda/netns 4 | -------------------------------------------------------------------------------- /templates/tomcat/0/docker-compose.yml: -------------------------------------------------------------------------------- 1 | lb: 2 | image: rancher/haproxy-tomcat:v0.0.1 3 | ports: 4 | - 80:80 5 | links: 6 | - tomcat 7 | tomcat: 8 | image: tomcat:8.0 9 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Shopify/sarama/tools/kafka-console-consumer/.gitignore: -------------------------------------------------------------------------------- 1 | kafka-console-consumer 2 | kafka-console-consumer.test 3 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Shopify/sarama/tools/kafka-console-producer/.gitignore: -------------------------------------------------------------------------------- 1 | kafka-console-producer 2 | kafka-console-producer.test 3 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/godbus/dbus/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Brandon Philips (@philips) 2 | Brian Waldon (@bcwaldon) 3 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_13: -------------------------------------------------------------------------------- 1 | 2 | # TYPE metric counter 3 | # TYPE metric untyped 4 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/abbot/go-http-auth/test.htpasswd: -------------------------------------------------------------------------------- 1 | test:{SHA}qvTGHdzF6KLavt4PO0gs2a6pQ00= 2 | test2:$apr1$a0j62R97$mYqFkloXH0/UOaUnAiV2b0 3 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/text/doc.go: -------------------------------------------------------------------------------- 1 | // Package text provides rudimentary functions for manipulating text in 2 | // paragraphs. 3 | package text 4 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_7: -------------------------------------------------------------------------------- 1 | 2 | # TYPE metric summary 3 | metric{quantile="bla"} 3.14 4 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/stretchr/objx/README.md: -------------------------------------------------------------------------------- 1 | # objx 2 | 3 | * Jump into the [API Documentation](http://godoc.org/github.com/stretchr/objx) 4 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/process/expected/darwin/%2Fbin%2Fps-ax-opid_fail: -------------------------------------------------------------------------------- 1 | PID 2 | 245 3 | 247 4 | 248 5 | 249 6 | 254 7 | 262 8 | 264 9 | 265 10 | 267 11 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_19: -------------------------------------------------------------------------------- 1 | 2 | # TYPE metric histogram 3 | metric_bucket{le="bla"} 3.14 4 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/nsenter/nsenter_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux !cgo 2 | 3 | package nsenter 4 | 5 | import "C" 6 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Shopify/sarama/tools/kafka-console-partitionconsumer/.gitignore: -------------------------------------------------------------------------------- 1 | kafka-console-partitionconsumer 2 | kafka-console-partitionconsumer.test 3 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Sirupsen/logrus/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.2 4 | - 1.3 5 | - 1.4 6 | - tip 7 | install: 8 | - go get -t ./... 9 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/stacktrace/stacktrace.go: -------------------------------------------------------------------------------- 1 | package stacktrace 2 | 3 | type Stacktrace struct { 4 | Frames []Frame 5 | } 6 | -------------------------------------------------------------------------------- /templates/cadvisor-proxy/0/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # proxy cadvisor traffic hack 2 | cadvisor: 3 | image: rancher/haproxy-cadvisor:v0.0.1 4 | labels: 5 | io.rancher.scheduler.global: 'true' 6 | net: host 7 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/configs/namespaces.go: -------------------------------------------------------------------------------- 1 | package configs 2 | 3 | type NamespaceType string 4 | 5 | type Namespaces []Namespace 6 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/integration/doc.go: -------------------------------------------------------------------------------- 1 | // integration is used for integration testing of libcontainer 2 | package integration 3 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/stats_freebsd.go: -------------------------------------------------------------------------------- 1 | package libcontainer 2 | 3 | type Stats struct { 4 | Interfaces []*NetworkInterface 5 | } 6 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/stats_windows.go: -------------------------------------------------------------------------------- 1 | package libcontainer 2 | 3 | type Stats struct { 4 | Interfaces []*NetworkInterface 5 | } 6 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/user/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Tianon Gravi (@tianon) 2 | Aleksa Sarai (@cyphar) 3 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/integration/tests/TODO.md: -------------------------------------------------------------------------------- 1 | Tests to Write: 2 | - UI comes up 3 | -- / -> /containers 4 | -- /containers 5 | -- /docker 6 | - API tests 7 | -- /containers 8 | -- /subcontainers 9 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/README.md: -------------------------------------------------------------------------------- 1 | This code provides helper functions for dealing with archive files. 2 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/autocomplete/zsh_autocomplete: -------------------------------------------------------------------------------- 1 | autoload -U compinit && compinit 2 | autoload -U bashcompinit && bashcompinit 3 | 4 | script_dir=$(dirname $0) 5 | source ${script_dir}/bash_autocomplete 6 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/text/Readme: -------------------------------------------------------------------------------- 1 | This is a Go package for manipulating paragraphs of text. 2 | 3 | See http://go.pkgdoc.org/github.com/kr/text for full documentation. 4 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/godbus/dbus/transport_darwin.go: -------------------------------------------------------------------------------- 1 | package dbus 2 | 3 | func (t *unixTransport) SendNullByte() error { 4 | _, err := t.Write([]byte{0}) 5 | return err 6 | } 7 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Shopify/sarama/vagrant/toxiproxy.conf: -------------------------------------------------------------------------------- 1 | start on started networking 2 | stop on shutdown 3 | 4 | env KAFKA_INSTALL_ROOT=/opt 5 | 6 | exec /opt/run_toxiproxy.sh 7 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/configs/cgroup_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !windows,!linux,!freebsd 2 | 3 | package configs 4 | 5 | type Cgroup struct { 6 | } 7 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/collector/config/sample_config_prometheus.json: -------------------------------------------------------------------------------- 1 | { 2 | "endpoint" : "http://localhost:8080/metrics", 3 | "polling_frequency" : 10, 4 | "metrics_config" : [ 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /images/haproxy-tomcat/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | version=v0.0.1 4 | image=haproxy-tomcat 5 | 6 | docker build -t rancher/$image:$version . 7 | docker tag rancher/$image:$version rancher/$image 8 | docker push rancher/$image 9 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Sirupsen/logrus/terminal_openbsd.go: -------------------------------------------------------------------------------- 1 | package logrus 2 | 3 | import "syscall" 4 | 5 | const ioctlReadTermios = syscall.TIOCGETA 6 | 7 | type Termios syscall.Termios 8 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/ioutils/scheduler.go: -------------------------------------------------------------------------------- 1 | // +build !gccgo 2 | 3 | package ioutils 4 | 5 | func callSchedulerIfNecessary() { 6 | } 7 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/libcontainer/user/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Tianon Gravi (@tianon) 2 | Aleksa Sarai (@cyphar) 3 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/klauspost/crc32/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.3 5 | - 1.4 6 | - 1.5 7 | - tip 8 | 9 | script: 10 | - go test -v . 11 | - go test -v -race . 12 | -------------------------------------------------------------------------------- /templates/tomcat/0/rancher-compose.yml: -------------------------------------------------------------------------------- 1 | tomcat: 2 | scale: 3 3 | health_check: 4 | port: 8080 5 | interval: 5000 6 | unhealthy_threshold: 2 7 | request_line: '/' 8 | healthy_threshold: 2 9 | response_timeout: 5000 10 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/opencontainers/runc/libcontainer/user/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Tianon Gravi (@tianon) 2 | Aleksa Sarai (@cyphar) 3 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Sirupsen/logrus/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # 0.7.3 2 | 3 | formatter/\*: allow configuration of timestamp layout 4 | 5 | # 0.7.2 6 | 7 | formatter/text: Add configuration option for time format (#158) 8 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/process/process_linux_386.go: -------------------------------------------------------------------------------- 1 | // +build linux 2 | // +build 386 3 | 4 | package process 5 | 6 | const ( 7 | ClockTicks = 100 // C.sysconf(C._SC_CLK_TCK) 8 | PageSize = 4096 // C.sysconf(C._SC_PAGE_SIZE) 9 | ) 10 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/process/process_linux_arm.go: -------------------------------------------------------------------------------- 1 | // +build linux 2 | // +build arm 3 | 4 | package process 5 | 6 | const ( 7 | ClockTicks = 100 // C.sysconf(C._SC_CLK_TCK) 8 | PageSize = 4096 // C.sysconf(C._SC_PAGE_SIZE) 9 | ) 10 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/golang.org/x/oauth2/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 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/process/process_linux_amd64.go: -------------------------------------------------------------------------------- 1 | // +build linux 2 | // +build amd64 3 | 4 | package process 5 | 6 | const ( 7 | ClockTicks = 100 // C.sysconf(C._SC_CLK_TCK) 8 | PageSize = 4096 // C.sysconf(C._SC_PAGE_SIZE) 9 | ) 10 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/golang.org/x/oauth2/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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Shopify/sarama/vagrant/zookeeper.conf: -------------------------------------------------------------------------------- 1 | start on started toxiproxy 2 | stop on stopping toxiproxy 3 | 4 | exec /opt/kafka-KAFKAID/bin/zookeeper-server-start.sh /opt/kafka-KAFKAID/config/zookeeper.properties 5 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_1: -------------------------------------------------------------------------------- 1 | 2 | minimal_metric 1.234 3 | another_metric -3e3 103948 4 | # Even that: 5 | no_labels{} 3 6 | # HELP line for non-existing metric will be ignored. 7 | -------------------------------------------------------------------------------- /images/haproxy-cadvisor/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | version=v0.0.1 4 | 5 | # cadvisor network hack 6 | docker build -t rancher/haproxy-cadvisor:$version . 7 | docker tag rancher/haproxy-cadvisor:$version rancher/haproxy-cadvisor 8 | docker push rancher/haproxy-cadvisor 9 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/terminal_openbsd.go: -------------------------------------------------------------------------------- 1 | package logrus 2 | 3 | import "syscall" 4 | 5 | const ioctlReadTermios = syscall.TIOCGETA 6 | 7 | type Termios syscall.Termios 8 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/opts/hosts_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package opts 4 | 5 | import "fmt" 6 | 7 | var DefaultHost = fmt.Sprintf("unix://%s", DefaultUnixSocket) 8 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/client_model/NOTICE: -------------------------------------------------------------------------------- 1 | Data model artifacts for Prometheus. 2 | Copyright 2012-2015 The Prometheus Authors 3 | 4 | This product includes software developed at 5 | SoundCloud Ltd. (http://soundcloud.com/). 6 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/pretty/Readme: -------------------------------------------------------------------------------- 1 | package pretty 2 | 3 | import "github.com/kr/pretty" 4 | 5 | Package pretty provides pretty-printing for Go values. 6 | 7 | Documentation 8 | 9 | http://godoc.org/github.com/kr/pretty 10 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/text/colwriter/Readme: -------------------------------------------------------------------------------- 1 | Package colwriter provides a write filter that formats 2 | input lines in multiple columns. 3 | 4 | The package is a straightforward translation from 5 | /src/cmd/draw/mc.c in Plan 9 from User Space. 6 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/opts/hosts_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package opts 4 | 5 | import "fmt" 6 | 7 | var DefaultHost = fmt.Sprintf("tcp://%s:%d", DefaultHTTPHost, DefaultHTTPPort) 8 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Shopify/sarama/vagrant/kafka.conf: -------------------------------------------------------------------------------- 1 | start on started zookeeper-ZK_PORT 2 | stop on stopping zookeeper-ZK_PORT 3 | 4 | pre-start exec sleep 2 5 | exec /opt/kafka-KAFKAID/bin/kafka-server-start.sh /opt/kafka-KAFKAID/config/server.properties 6 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/meminfo_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!windows 2 | 3 | package system 4 | 5 | func ReadMemInfo() (*MemInfo, error) { 6 | return nil, ErrNotSupportedPlatform 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/configs/cgroup_windows.go: -------------------------------------------------------------------------------- 1 | package configs 2 | 3 | // TODO Windows: This can ultimately be entirely factored out on Windows as 4 | // cgroups are a Unix-specific construct. 5 | type Cgroup struct { 6 | } 7 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/criu_opts_windows.go: -------------------------------------------------------------------------------- 1 | package libcontainer 2 | 3 | // TODO Windows: This can ultimately be entirely factored out as criu is 4 | // a Unix concept not relevant on Windows. 5 | type CriuOpts struct { 6 | } 7 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/docs/development/README.md: -------------------------------------------------------------------------------- 1 | The [development](./) directory holds documentation for cAdvisor developers and contributors. If you 2 | are looking for development using cAdvisor (as opposed to development of cAdvisor), then these 3 | documents probably don't apply to you. 4 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | go: 4 | - 1.5.3 5 | install: 6 | - true 7 | before_script: 8 | - go get golang.org/x/tools/cmd/vet 9 | - go get github.com/kr/godep 10 | script: 11 | - export PATH=$PATH:$HOME/gopath/bin 12 | - ./build/presubmit.sh 13 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/fs_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package symlink 4 | 5 | import ( 6 | "path/filepath" 7 | ) 8 | 9 | func evalSymlinks(path string) (string, error) { 10 | return filepath.EvalSymlinks(path) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/stats_linux.go: -------------------------------------------------------------------------------- 1 | package libcontainer 2 | 3 | import "github.com/opencontainers/runc/libcontainer/cgroups" 4 | 5 | type Stats struct { 6 | Interfaces []*NetworkInterface 7 | CgroupStats *cgroups.Stats 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/abbot/go-http-auth/Makefile: -------------------------------------------------------------------------------- 1 | include $(GOROOT)/src/Make.inc 2 | 3 | TARG=auth_digest 4 | GOFILES=\ 5 | auth.go\ 6 | digest.go\ 7 | basic.go\ 8 | misc.go\ 9 | md5crypt.go\ 10 | users.go\ 11 | 12 | include $(GOROOT)/src/Make.pkg 13 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/xattr/errors.go: -------------------------------------------------------------------------------- 1 | package xattr 2 | 3 | import ( 4 | "fmt" 5 | "runtime" 6 | ) 7 | 8 | var ErrNotSupportedPlatform = fmt.Errorf("platform and architecture is not supported %s %s", runtime.GOOS, runtime.GOARCH) 9 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/collector/config/sample_config_prometheus_filtered.json: -------------------------------------------------------------------------------- 1 | { 2 | "endpoint" : "http://localhost:8080/metrics", 3 | "polling_frequency" : 10, 4 | "metrics_config" : [ 5 | "go_goroutines", 6 | "qps" 7 | ] 8 | } 9 | 10 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/system/utimes_darwin.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import "syscall" 4 | 5 | // LUtimesNano is not supported by darwin platform. 6 | func LUtimesNano(path string, ts []syscall.Timespec) error { 7 | return ErrNotSupportedPlatform 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/errors.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import ( 4 | "errors" 5 | ) 6 | 7 | var ( 8 | ErrNotSupportedPlatform = errors.New("platform and architecture is not supported") 9 | ) 10 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/nsenter/nsenter.go: -------------------------------------------------------------------------------- 1 | // +build linux,!gccgo 2 | 3 | package nsenter 4 | 5 | /* 6 | #cgo CFLAGS: -Wall 7 | extern void nsexec(); 8 | void __attribute__((constructor)) init(void) { 9 | nsexec(); 10 | } 11 | */ 12 | import "C" 13 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/AUTHORS: -------------------------------------------------------------------------------- 1 | # This is the official list of cAdvisor authors for copyright purposes. 2 | 3 | # Names should be added to this file as 4 | # Name or Organization 5 | # The email address is not required for organizations. 6 | 7 | # Please keep the list sorted. 8 | 9 | Google Inc. 10 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/system/meminfo_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!windows 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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/filesys.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package system 4 | 5 | import ( 6 | "os" 7 | ) 8 | 9 | func MkdirAll(path string, perm os.FileMode) error { 10 | return os.MkdirAll(path, perm) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/bitbucket.org/ww/goautoneg/Makefile: -------------------------------------------------------------------------------- 1 | include $(GOROOT)/src/Make.inc 2 | 3 | TARG=bitbucket.org/ww/goautoneg 4 | GOFILES=autoneg.go 5 | 6 | include $(GOROOT)/src/Make.pkg 7 | 8 | format: 9 | gofmt -w *.go 10 | 11 | docs: 12 | gomake clean 13 | godoc ${TARG} > README.txt 14 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/terminal_bsd.go: -------------------------------------------------------------------------------- 1 | // +build darwin freebsd openbsd netbsd dragonfly 2 | 3 | package logrus 4 | 5 | import "syscall" 6 | 7 | const ioctlReadTermios = syscall.TIOCGETA 8 | 9 | type Termios syscall.Termios 10 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/umask.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package system 4 | 5 | import ( 6 | "syscall" 7 | ) 8 | 9 | func Umask(newmask int) (oldmask int, err error) { 10 | return syscall.Umask(newmask), nil 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/umask_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package system 4 | 5 | func Umask(newmask int) (oldmask int, err error) { 6 | // should not be called on cli code path 7 | return 0, ErrNotSupportedPlatform 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/godbus/dbus/homedir_dynamic.go: -------------------------------------------------------------------------------- 1 | // +build !static_build 2 | 3 | package dbus 4 | 5 | import ( 6 | "os/user" 7 | ) 8 | 9 | func lookupHomeDir() string { 10 | u, err := user.Current() 11 | if err != nil { 12 | return "/" 13 | } 14 | return u.HomeDir 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/configs/hugepage_limit.go: -------------------------------------------------------------------------------- 1 | package configs 2 | 3 | type HugepageLimit struct { 4 | // which type of hugepage to limit. 5 | Pagesize string `json:"page_size"` 6 | 7 | // usage limit for hugepage. 8 | Limit uint64 `json:"limit"` 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/host/types_darwin.go: -------------------------------------------------------------------------------- 1 | // +build ignore 2 | // plus hand editing about timeval 3 | 4 | /* 5 | Input to cgo -godefs. 6 | */ 7 | 8 | package host 9 | 10 | /* 11 | #include 12 | #include 13 | */ 14 | import "C" 15 | 16 | type Utmpx C.struct_utmpx 17 | type Timeval C.struct_timeval 18 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/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.1.3" 9 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE: -------------------------------------------------------------------------------- 1 | procfs provides functions to retrieve system, kernel and process 2 | metrics from the pseudo-filesystem proc. 3 | 4 | Copyright 2014-2015 The Prometheus Authors 5 | 6 | This product includes software developed at 7 | SoundCloud Ltd. (http://soundcloud.com/). 8 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/configs/namespaces_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!freebsd 2 | 3 | package configs 4 | 5 | // Namespace defines configuration for each namespace. It specifies an 6 | // alternate path that is able to be joined via setns. 7 | type Namespace struct { 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/golang/snappy/README: -------------------------------------------------------------------------------- 1 | The Snappy compression format in the Go programming language. 2 | 3 | To download and install from source: 4 | $ go get github.com/golang/snappy 5 | 6 | Unless otherwise noted, the Snappy-Go source files are distributed 7 | under the BSD-style license found in the LICENSE file. 8 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: required 3 | go: 4 | - 1.3.3 5 | - 1.4.2 6 | - 1.5.1 7 | - tip 8 | env: 9 | - GOARCH=amd64 10 | - GOARCH=386 11 | script: 12 | - make test 13 | - DOCKER_HOST=tcp://127.0.0.1:2375 make integration 14 | services: 15 | - docker 16 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/filter.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012-2015 Oliver Eilhard. All rights reserved. 2 | // Use of this source code is governed by a MIT-license. 3 | // See http://olivere.mit-license.org/license.txt for details. 4 | 5 | package elastic 6 | 7 | type Filter interface { 8 | Source() interface{} 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/compat_1.5_linux.go: -------------------------------------------------------------------------------- 1 | // +build linux,!go1.5 2 | 3 | package libcontainer 4 | 5 | import "syscall" 6 | 7 | // GidMappingsEnableSetgroups was added in Go 1.5, so do nothing when building 8 | // with earlier versions 9 | func enableSetgroups(sys *syscall.SysProcAttr) { 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/mount/mounter_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!freebsd freebsd,!cgo 2 | 3 | package mount 4 | 5 | func mount(device, target, mType string, flag uintptr, data string) error { 6 | panic("Not implemented") 7 | } 8 | 9 | func unmount(target string, flag int) error { 10 | panic("Not implemented") 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "github.com/urfave/cli" 5 | "os" 6 | ) 7 | 8 | func main() { 9 | app := cli.NewApp() 10 | app.Version = "0.0.1" 11 | app.Name = "autoscale" 12 | app.Usage = "Scale Rancher components based on resource usage" 13 | 14 | app.Commands = []cli.Command{ 15 | LoadCommand(), 16 | ServiceCommand(), 17 | } 18 | 19 | app.Run(os.Args) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/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 return oldmask. 11 | func Umask(newmask int) (oldmask int, err error) { 12 | return syscall.Umask(newmask), nil 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/jmespath/go-jmespath/fuzz/jmespath.go: -------------------------------------------------------------------------------- 1 | package jmespath 2 | 3 | import "github.com/jmespath/go-jmespath" 4 | 5 | // Fuzz will fuzz test the JMESPath parser. 6 | func Fuzz(data []byte) int { 7 | p := jmespath.NewParser() 8 | _, err := p.Parse(string(data)) 9 | if err != nil { 10 | return 1 11 | } 12 | return 0 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/mount/mountinfo_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!freebsd freebsd,!cgo 2 | 3 | package mount 4 | 5 | import ( 6 | "fmt" 7 | "runtime" 8 | ) 9 | 10 | func parseMountTable() ([]*Info, error) { 11 | return nil, fmt.Errorf("mount.parseMountTable is not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/system/utimes_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!freebsd,!darwin 2 | 3 | package system 4 | 5 | import "syscall" 6 | 7 | // LUtimesNano is not supported on platforms other than linux, freebsd and darwin. 8 | func LUtimesNano(path string, ts []syscall.Timespec) error { 9 | return ErrNotSupportedPlatform 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/mknod_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package system 4 | 5 | func Mknod(path string, mode uint32, dev int) error { 6 | return ErrNotSupportedPlatform 7 | } 8 | 9 | func Mkdev(major int64, minor int64) uint32 { 10 | panic("Mkdev not implemented on Windows.") 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/cpu/cpu_darwin_nocgo.go: -------------------------------------------------------------------------------- 1 | // +build darwin 2 | // +build !cgo 3 | 4 | package cpu 5 | 6 | import "github.com/shirou/gopsutil/internal/common" 7 | 8 | func perCPUTimes() ([]TimesStat, error) { 9 | return []TimesStat{}, common.ErrNotImplementedError 10 | } 11 | 12 | func allCPUTimes() ([]TimesStat, error) { 13 | return []TimesStat{}, common.ErrNotImplementedError 14 | } 15 | -------------------------------------------------------------------------------- /Dockerfile.build: -------------------------------------------------------------------------------- 1 | FROM golang:alpine 2 | 3 | ENV PROJECT github.com/llparse/rancher-autoscale 4 | RUN apk update && apk add git 5 | RUN go get github.com/Sirupsen/logrus 6 | RUN go get github.com/golang/glog 7 | RUN go get github.com/gorilla/websocket 8 | #RUN go get github.com/google/cadvisor 9 | 10 | RUN mkdir -p /go/src/$PROJECT 11 | ADD . /go/src/$PROJECT 12 | WORKDIR /go/src/$PROJECT 13 | RUN go build 14 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/golang.org/x/oauth2/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.3 5 | - 1.4 6 | 7 | install: 8 | - export GOPATH="$HOME/gopath" 9 | - mkdir -p "$GOPATH/src/golang.org/x" 10 | - mv "$TRAVIS_BUILD_DIR" "$GOPATH/src/golang.org/x/oauth2" 11 | - go get -v -t -d golang.org/x/oauth2/... 12 | 13 | script: 14 | - go test -v golang.org/x/oauth2/... 15 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/SeanDolphin/bqschema/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.2 4 | - 1.4 5 | - tip 6 | before_install: 7 | - go get github.com/axw/gocov/gocov 8 | - go get github.com/mattn/goveralls 9 | - if ! go get code.google.com/p/go.tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; fi 10 | script: 11 | - $HOME/gopath/bin/goveralls -service=travis-ci -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/utimes_darwin.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import "syscall" 4 | 5 | func LUtimesNano(path string, ts []syscall.Timespec) error { 6 | return ErrNotSupportedPlatform 7 | } 8 | 9 | func UtimesNano(path string, ts []syscall.Timespec) error { 10 | return syscall.UtimesNano(path, ts) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/fixtures/26231/stat: -------------------------------------------------------------------------------- 1 | 26231 (vim) R 5392 7446 5392 34835 7446 4218880 32533 309516 26 82 1677 44 158 99 20 0 1 0 82375 56274944 1981 18446744073709551615 4194304 6294284 140736914091744 140736914087944 139965136429984 0 0 12288 1870679807 0 0 0 17 0 0 0 31 0 0 8391624 8481048 16420864 140736914093252 140736914093279 140736914093279 140736914096107 0 2 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/stretchr/objx/security.go: -------------------------------------------------------------------------------- 1 | package objx 2 | 3 | import ( 4 | "crypto/sha1" 5 | "encoding/hex" 6 | ) 7 | 8 | // HashWithKey hashes the specified string using the security 9 | // key. 10 | func HashWithKey(data, key string) string { 11 | hash := sha1.New() 12 | hash.Write([]byte(data + ":" + key)) 13 | return hex.EncodeToString(hash.Sum(nil)) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/load/load_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package load 4 | 5 | import ( 6 | "github.com/shirou/gopsutil/internal/common" 7 | ) 8 | 9 | func Avg() (*AvgStat, error) { 10 | ret := AvgStat{} 11 | 12 | return &ret, common.ErrNotImplementedError 13 | } 14 | 15 | func Misc() (*MiscStat, error) { 16 | ret := MiscStat{} 17 | 18 | return &ret, common.ErrNotImplementedError 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/process/process_posix_test.go: -------------------------------------------------------------------------------- 1 | // +build linux freebsd 2 | 3 | package process 4 | 5 | import ( 6 | "os" 7 | "syscall" 8 | "testing" 9 | ) 10 | 11 | func Test_SendSignal(t *testing.T) { 12 | checkPid := os.Getpid() 13 | 14 | p, _ := NewProcess(int32(checkPid)) 15 | err := p.SendSignal(syscall.SIGCONT) 16 | if err != nil { 17 | t.Errorf("send signal %v", err) 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/configs/interface_priority_map.go: -------------------------------------------------------------------------------- 1 | package configs 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | type IfPrioMap struct { 8 | Interface string `json:"interface"` 9 | Priority int64 `json:"priority"` 10 | } 11 | 12 | func (i *IfPrioMap) CgroupString() string { 13 | return fmt.Sprintf("%s %d", i.Interface, i.Priority) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/container_nouserns_linux.go: -------------------------------------------------------------------------------- 1 | // +build !go1.4 2 | 3 | package libcontainer 4 | 5 | import ( 6 | "fmt" 7 | "syscall" 8 | ) 9 | 10 | // not available before go 1.4 11 | func (c *linuxContainer) addUidGidMappings(sys *syscall.SysProcAttr) error { 12 | return fmt.Errorf("User namespace is not supported in golang < 1.4") 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/deploy/canary/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:latest 2 | MAINTAINER vmarmol@google.com 3 | 4 | RUN apt-get install -y git dmsetup 5 | RUN git clone https://github.com/google/cadvisor.git /go/src/github.com/google/cadvisor 6 | RUN go get github.com/tools/godep 7 | RUN cd /go/src/github.com/google/cadvisor && godep go build . 8 | 9 | ENTRYPOINT ["/go/src/github.com/google/cadvisor/cadvisor"] 10 | 11 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/circle.yml: -------------------------------------------------------------------------------- 1 | machine: 2 | timezone: 3 | Asia/Tokyo 4 | test: 5 | override: 6 | - GOOS=linux GOARCH=amd64 go test -v ./... 7 | - GOOS=linux GOARCH=386 go get -v ./... 8 | - GOOS=linux GOARCH=arm GOARM=7 go get -v ./... 9 | - GOOS=freebsd GOARCH=amd64 go get -v ./... 10 | - GOOS=windows GOARCH=amd64 go get -v ./... 11 | - GOOS=darwin GOARCH=amd64 go get -v ./... 12 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/README.md: -------------------------------------------------------------------------------- 1 | context 2 | ======= 3 | [![Build Status](https://travis-ci.org/gorilla/context.png?branch=master)](https://travis-ci.org/gorilla/context) 4 | 5 | gorilla/context is a general purpose registry for global request variables. 6 | 7 | Read the full documentation here: http://www.gorillatoolkit.org/pkg/context 8 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/stats.go: -------------------------------------------------------------------------------- 1 | package libcontainer 2 | 3 | type NetworkInterface struct { 4 | // Name is the name of the network interface. 5 | Name string 6 | 7 | RxBytes uint64 8 | RxPackets uint64 9 | RxErrors uint64 10 | RxDropped uint64 11 | TxBytes uint64 12 | TxPackets uint64 13 | TxErrors uint64 14 | TxDropped uint64 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/AUTHORS.md: -------------------------------------------------------------------------------- 1 | The Prometheus project was started by Matt T. Proud (emeritus) and 2 | Julius Volz in 2012. 3 | 4 | Maintainers of this repository: 5 | 6 | * Tobias Schmidt 7 | 8 | The following individuals have contributed code to this repository 9 | (listed in alphabetical order): 10 | 11 | * Tobias Schmidt 12 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/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 | package logrus 7 | 8 | import "syscall" 9 | 10 | const ioctlReadTermios = syscall.TCGETS 11 | 12 | type Termios syscall.Termios 13 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/xattrs_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package system 4 | 5 | func Lgetxattr(path string, attr string) ([]byte, error) { 6 | return nil, ErrNotSupportedPlatform 7 | } 8 | 9 | func Lsetxattr(path string, attr string, data []byte, flags int) error { 10 | return ErrNotSupportedPlatform 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/fixtures/584/stat: -------------------------------------------------------------------------------- 1 | 1020 ((a b ) ( c d) ) R 28378 1020 28378 34842 1020 4218880 286 0 0 0 0 0 0 0 20 0 1 0 10839175 10395648 155 18446744073709551615 4194304 4238788 140736466511168 140736466511168 140609271124624 0 0 0 0 0 0 0 17 5 0 0 0 0 0 6336016 6337300 25579520 140736466515030 140736466515061 140736466515061 140736466518002 0 2 | #!/bin/cat /proc/self/stat 3 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Sirupsen/logrus/terminal_darwin.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 | package logrus 7 | 8 | import "syscall" 9 | 10 | const ioctlReadTermios = syscall.TIOCGETA 11 | 12 | type Termios syscall.Termios 13 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/console.go: -------------------------------------------------------------------------------- 1 | package libcontainer 2 | 3 | import "io" 4 | 5 | // Console represents a pseudo TTY. 6 | type Console interface { 7 | io.ReadWriter 8 | io.Closer 9 | 10 | // Path returns the filesystem path to the slave side of the pty. 11 | Path() string 12 | 13 | // Fd returns the fd for the master of the pty. 14 | Fd() uintptr 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/stretchr/objx/.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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/stretchr/objx/value.go: -------------------------------------------------------------------------------- 1 | package objx 2 | 3 | // Value provides methods for extracting interface{} data in various 4 | // types. 5 | type Value struct { 6 | // data contains the raw data being managed by this Value 7 | data interface{} 8 | } 9 | 10 | // Data returns the raw data contained by this Value 11 | func (v *Value) Data() interface{} { 12 | return v.data 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/uritemplates/utils.go: -------------------------------------------------------------------------------- 1 | package uritemplates 2 | 3 | func Expand(path string, expansions map[string]string) (string, error) { 4 | template, err := Parse(path) 5 | if err != nil { 6 | return "", err 7 | } 8 | values := make(map[string]interface{}) 9 | for k, v := range expansions { 10 | values[k] = v 11 | } 12 | return template.Expand(values) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/eapache/queue/.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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/ioutils/scheduler_gccgo.go: -------------------------------------------------------------------------------- 1 | // +build gccgo 2 | 3 | package ioutils 4 | 5 | import ( 6 | "runtime" 7 | ) 8 | 9 | func callSchedulerIfNecessary() { 10 | //allow or force Go scheduler to switch context, without explicitly 11 | //forcing this will make it hang when using gccgo implementation 12 | runtime.Gosched() 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/setgroups_linux.go: -------------------------------------------------------------------------------- 1 | // +build linux,go1.5 2 | 3 | package libcontainer 4 | 5 | import "syscall" 6 | 7 | // Set the GidMappingsEnableSetgroups member to true, so the process's 8 | // setgroups proc entry wont be set to 'deny' if GidMappings are set 9 | func enableSetgroups(sys *syscall.SysProcAttr) { 10 | sys.GidMappingsEnableSetgroups = true 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/rancher/go-rancher-metadata/metadata/utils.go: -------------------------------------------------------------------------------- 1 | package metadata 2 | 3 | import ( 4 | "time" 5 | ) 6 | 7 | func testConnection(mdClient *Client) error { 8 | var err error 9 | maxTime := 20 * time.Second 10 | 11 | for i := 1 * time.Second; i < maxTime; i *= time.Duration(2) { 12 | if _, err = mdClient.GetVersion(); err != nil { 13 | time.Sleep(i) 14 | } else { 15 | return nil 16 | } 17 | } 18 | return err 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/text/mc/Readme: -------------------------------------------------------------------------------- 1 | Command mc prints in multiple columns. 2 | 3 | Usage: mc [-] [-N] [file...] 4 | 5 | Mc splits the input into as many columns as will fit in N 6 | print positions. If the output is a tty, the default N is 7 | the number of characters in a terminal line; otherwise the 8 | default N is 80. Under option - each input line ending in 9 | a colon ':' is printed separately. 10 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/utils.go: -------------------------------------------------------------------------------- 1 | package uritemplates 2 | 3 | func Expand(path string, expansions map[string]string) (string, error) { 4 | template, err := Parse(path) 5 | if err != nil { 6 | return "", err 7 | } 8 | values := make(map[string]interface{}) 9 | for k, v := range expansions { 10 | values[k] = v 11 | } 12 | return template.Expand(values) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/host/host_darwin_amd64.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs types_darwin.go 3 | 4 | package host 5 | 6 | type Utmpx struct { 7 | User [256]int8 8 | ID [4]int8 9 | Line [32]int8 10 | Pid int32 11 | Type int16 12 | Pad_cgo_0 [6]byte 13 | Tv Timeval 14 | Host [256]int8 15 | Pad [16]uint32 16 | } 17 | type Timeval struct { 18 | Sec int32 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/golang.org/x/oauth2/google/appengine_hook.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The oauth2 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 appengine appenginevm 6 | 7 | package google 8 | 9 | import "google.golang.org/appengine" 10 | 11 | func init() { 12 | appengineTokenFunc = appengine.AccessToken 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/autocomplete/bash_autocomplete: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | : ${PROG:=$(basename ${BASH_SOURCE})} 4 | 5 | _cli_bash_autocomplete() { 6 | local cur opts base 7 | COMPREPLY=() 8 | cur="${COMP_WORDS[COMP_CWORD]}" 9 | opts=$( ${COMP_WORDS[@]:0:$COMP_CWORD} --generate-bash-completion ) 10 | COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) 11 | return 0 12 | } 13 | 14 | complete -F _cli_bash_autocomplete $PROG 15 | -------------------------------------------------------------------------------- /images/haproxy-tomcat/haproxy.cfg: -------------------------------------------------------------------------------- 1 | global 2 | log 127.0.0.1 local0 3 | log 127.0.0.1 local1 notice 4 | daemon 5 | debug 6 | #quiet 7 | 8 | defaults 9 | log global 10 | mode http 11 | option dontlognull 12 | timeout connect 5000 13 | timeout client 50000 14 | timeout server 50000 15 | 16 | frontend public 17 | bind :80 18 | default_backend tomcat 19 | 20 | backend tomcat 21 | server srv tomcat:8080 maxconn 254 22 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Shopify/sarama/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | *.test 6 | 7 | # Folders 8 | _obj 9 | _test 10 | .vagrant 11 | 12 | # Architecture specific extensions/prefixes 13 | *.[568vq] 14 | [568vq].out 15 | 16 | *.cgo1.go 17 | *.cgo2.c 18 | _cgo_defun.c 19 | _cgo_gotypes.go 20 | _cgo_export.* 21 | 22 | _testmain.go 23 | 24 | *.exe 25 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/utimes_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!freebsd,!darwin 2 | 3 | package system 4 | 5 | import "syscall" 6 | 7 | func LUtimesNano(path string, ts []syscall.Timespec) error { 8 | return ErrNotSupportedPlatform 9 | } 10 | 11 | func UtimesNano(path string, ts []syscall.Timespec) error { 12 | return ErrNotSupportedPlatform 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/klauspost/crc32/.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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/SeanDolphin/bqschema/.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 | *.out 25 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/stretchr/objx/constants.go: -------------------------------------------------------------------------------- 1 | package objx 2 | 3 | const ( 4 | // PathSeparator is the character used to separate the elements 5 | // of the keypath. 6 | // 7 | // For example, `location.address.city` 8 | PathSeparator string = "." 9 | 10 | // SignatureSeparator is the character that is used to 11 | // separate the Base64 string from the security signature. 12 | SignatureSeparator = "_" 13 | ) 14 | -------------------------------------------------------------------------------- /images/haproxy-cadvisor/haproxy.cfg: -------------------------------------------------------------------------------- 1 | global 2 | log 127.0.0.1 local0 3 | log 127.0.0.1 local1 notice 4 | daemon 5 | debug 6 | #quiet 7 | 8 | defaults 9 | log global 10 | mode http 11 | option dontlognull 12 | timeout connect 5000 13 | timeout client 50000 14 | timeout server 50000 15 | 16 | frontend public 17 | bind :9244 18 | default_backend cadvisor 19 | 20 | backend cadvisor 21 | server srv 127.0.0.1:9344 maxconn 254 22 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Shopify/sarama/vagrant/provision.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -ex 4 | 5 | apt-get update 6 | yes | apt-get install default-jre 7 | 8 | export KAFKA_INSTALL_ROOT=/opt 9 | export KAFKA_HOSTNAME=192.168.100.67 10 | export KAFKA_VERSION=0.9.0.0 11 | export REPOSITORY_ROOT=/vagrant 12 | 13 | sh /vagrant/vagrant/install_cluster.sh 14 | sh /vagrant/vagrant/setup_services.sh 15 | sh /vagrant/vagrant/create_topics.sh 16 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/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 | package logrus 7 | 8 | import "syscall" 9 | 10 | const ioctlReadTermios = syscall.TCGETS 11 | 12 | type Termios syscall.Termios 13 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/xattr/xattr_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package xattr 4 | 5 | func Listxattr(path string) ([]string, error) { 6 | return nil, ErrNotSupportedPlatform 7 | } 8 | 9 | func Getxattr(path, attr string) (string, error) { 10 | return "", ErrNotSupportedPlatform 11 | } 12 | 13 | func Setxattr(path, xattr, value string) error { 14 | return ErrNotSupportedPlatform 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/cluster-test/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: build run-omega-cluster-test 2 | 3 | default: build 4 | 5 | build: 6 | go build cluster-test.go 7 | 8 | run-omega-cluster-test: 9 | go run -race cluster-test.go \ 10 | -nodes=http://192.168.2.65:8200,http://192.168.2.64:8200 \ 11 | -n=5 \ 12 | -retries=5 \ 13 | -sniff=true -sniffer=10s \ 14 | -healthcheck=true -healthchecker=5s \ 15 | -errorlog=errors.log 16 | 17 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/README.md: -------------------------------------------------------------------------------- 1 | Package symlink implements EvalSymlinksInScope which is an extension of filepath.EvalSymlinks, 2 | as well as a Windows long-path aware version of filepath.EvalSymlinks 3 | from the [Go standard library](https://golang.org/pkg/path/filepath). 4 | 5 | The code from filepath.EvalSymlinks has been adapted in fs.go. 6 | Please read the LICENSE.BSD file that governs fs.go and LICENSE.APACHE for fs_test.go. 7 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/suggester_context.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012-2015 Oliver Eilhard. All rights reserved. 2 | // Use of this source code is governed by a MIT-license. 3 | // See http://olivere.mit-license.org/license.txt for details. 4 | 5 | package elastic 6 | 7 | // SuggesterContextQuery is used to define context information within 8 | // a suggestion request. 9 | type SuggesterContextQuery interface { 10 | Source() interface{} 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/stretchr/objx/codegen/array-access.txt: -------------------------------------------------------------------------------- 1 | case []{1}: 2 | a := object.([]{1}) 3 | if isSet { 4 | a[index] = value.({1}) 5 | } else { 6 | if index >= len(a) { 7 | if panics { 8 | panic(fmt.Sprintf("objx: Index %d is out of range because the []{1} only contains %d items.", index, len(a))) 9 | } 10 | return nil 11 | } else { 12 | return a[index] 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Shopify/sarama/list_groups_request.go: -------------------------------------------------------------------------------- 1 | package sarama 2 | 3 | type ListGroupsRequest struct { 4 | } 5 | 6 | func (r *ListGroupsRequest) encode(pe packetEncoder) error { 7 | return nil 8 | } 9 | 10 | func (r *ListGroupsRequest) decode(pd packetDecoder) (err error) { 11 | return nil 12 | } 13 | 14 | func (r *ListGroupsRequest) key() int16 { 15 | return 16 16 | } 17 | 18 | func (r *ListGroupsRequest) version() int16 { 19 | return 0 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Shopify/sarama/vagrant/create_topics.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -ex 4 | 5 | cd ${KAFKA_INSTALL_ROOT}/kafka-9092 6 | bin/kafka-topics.sh --create --partitions 1 --replication-factor 3 --topic test.1 --zookeeper localhost:2181 7 | bin/kafka-topics.sh --create --partitions 4 --replication-factor 3 --topic test.4 --zookeeper localhost:2181 8 | bin/kafka-topics.sh --create --partitions 64 --replication-factor 3 --topic test.64 --zookeeper localhost:2181 9 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/system/stat_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!windows,!freebsd 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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_2: -------------------------------------------------------------------------------- 1 | 2 | # A normal comment. 3 | # 4 | # TYPE name counter 5 | name{labelname="val1",basename="basevalue"} NaN 6 | name {labelname="val2",basename="base\"v\\al\nue"} 0.23 1234567890 7 | # HELP name two-line\n doc str\\ing 8 | 9 | # HELP name2 doc str"ing 2 10 | # TYPE name2 gauge 11 | name2{labelname="val2" ,basename = "basevalue2" } +Inf 54321 12 | name2{ labelname = "val1" , }-Inf 13 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/stretchr/objx/tests.go: -------------------------------------------------------------------------------- 1 | package objx 2 | 3 | // Has gets whether there is something at the specified selector 4 | // or not. 5 | // 6 | // If m is nil, Has will always return false. 7 | func (m Map) Has(selector string) bool { 8 | if m == nil { 9 | return false 10 | } 11 | return !m.Get(selector).IsNil() 12 | } 13 | 14 | // IsNil gets whether the data is nil or not. 15 | func (v *Value) IsNil() bool { 16 | return v == nil || v.data == nil 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Shopify/sarama/heartbeat_response.go: -------------------------------------------------------------------------------- 1 | package sarama 2 | 3 | type HeartbeatResponse struct { 4 | Err KError 5 | } 6 | 7 | func (r *HeartbeatResponse) encode(pe packetEncoder) error { 8 | pe.putInt16(int16(r.Err)) 9 | return nil 10 | } 11 | 12 | func (r *HeartbeatResponse) decode(pd packetDecoder) error { 13 | if kerr, err := pd.getInt16(); err != nil { 14 | return err 15 | } else { 16 | r.Err = KError(kerr) 17 | } 18 | 19 | return nil 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/apparmor/apparmor_disabled.go: -------------------------------------------------------------------------------- 1 | // +build !apparmor !linux 2 | 3 | package apparmor 4 | 5 | import ( 6 | "errors" 7 | ) 8 | 9 | var ErrApparmorNotEnabled = errors.New("apparmor: config provided but apparmor not supported") 10 | 11 | func IsEnabled() bool { 12 | return false 13 | } 14 | 15 | func ApplyProfile(name string) error { 16 | if name != "" { 17 | return ErrApparmorNotEnabled 18 | } 19 | return nil 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/README.md: -------------------------------------------------------------------------------- 1 | # procfs 2 | 3 | This procfs package provides functions to retrieve system, kernel and process 4 | metrics from the pseudo-filesystem proc. 5 | 6 | [![GoDoc](https://godoc.org/github.com/prometheus/procfs?status.png)](https://godoc.org/github.com/prometheus/procfs) 7 | [![Circle CI](https://circleci.com/gh/prometheus/procfs.svg?style=svg)](https://circleci.com/gh/prometheus/procfs) 8 | 9 | # Testing 10 | 11 | $ go test 12 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Sirupsen/logrus/terminal_freebsd.go: -------------------------------------------------------------------------------- 1 | /* 2 | Go 1.2 doesn't include Termios for FreeBSD. This should be added in 1.3 and this could be merged with terminal_darwin. 3 | */ 4 | package logrus 5 | 6 | import ( 7 | "syscall" 8 | ) 9 | 10 | const ioctlReadTermios = syscall.TIOCGETA 11 | 12 | type Termios struct { 13 | Iflag uint32 14 | Oflag uint32 15 | Cflag uint32 16 | Lflag uint32 17 | Cc [20]uint8 18 | Ispeed uint32 19 | Ospeed uint32 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/golang.org/x/net/context/ctxhttp/cancelreq.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 go1.5 6 | 7 | package ctxhttp 8 | 9 | import "net/http" 10 | 11 | func canceler(client *http.Client, req *http.Request) func() { 12 | ch := make(chan struct{}) 13 | req.Cancel = ch 14 | 15 | return func() { 16 | close(ch) 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Shopify/sarama/leave_group_response.go: -------------------------------------------------------------------------------- 1 | package sarama 2 | 3 | type LeaveGroupResponse struct { 4 | Err KError 5 | } 6 | 7 | func (r *LeaveGroupResponse) encode(pe packetEncoder) error { 8 | pe.putInt16(int16(r.Err)) 9 | return nil 10 | } 11 | 12 | func (r *LeaveGroupResponse) decode(pd packetDecoder) (err error) { 13 | if kerr, err := pd.getInt16(); err != nil { 14 | return err 15 | } else { 16 | r.Err = KError(kerr) 17 | } 18 | 19 | return nil 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/mistifyio/go-zfs/error.go: -------------------------------------------------------------------------------- 1 | package zfs 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | // Error is an error which is returned when the `zfs` or `zpool` shell 8 | // commands return with a non-zero exit code. 9 | type Error struct { 10 | Err error 11 | Debug string 12 | Stderr string 13 | } 14 | 15 | // Error returns the string representation of an Error. 16 | func (e Error) Error() string { 17 | return fmt.Sprintf("%s: %q => %s", e.Err, e.Debug, e.Stderr) 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/search_facets.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012-2015 Oliver Eilhard. All rights reserved. 2 | // Use of this source code is governed by a MIT-license. 3 | // See http://olivere.mit-license.org/license.txt for details. 4 | 5 | package elastic 6 | 7 | // Represents a glimpse into the data. 8 | // For more details about facets, visit: 9 | // http://elasticsearch.org/guide/reference/api/search/facets/ 10 | type Facet interface { 11 | Source() interface{} 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/godbus/dbus/homedir.go: -------------------------------------------------------------------------------- 1 | package dbus 2 | 3 | import ( 4 | "os" 5 | "sync" 6 | ) 7 | 8 | var ( 9 | homeDir string 10 | homeDirLock sync.Mutex 11 | ) 12 | 13 | func getHomeDir() string { 14 | homeDirLock.Lock() 15 | defer homeDirLock.Unlock() 16 | 17 | if homeDir != "" { 18 | return homeDir 19 | } 20 | 21 | homeDir = os.Getenv("HOME") 22 | if homeDir != "" { 23 | return homeDir 24 | } 25 | 26 | homeDir = lookupHomeDir() 27 | return homeDir 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/docs/clients.md: -------------------------------------------------------------------------------- 1 | # cAdvisor API Clients 2 | 3 | There is an official Go client implementation in the [client](../client/) directory. You can use it on your own Go project by including it like this: 4 | 5 | ```go 6 | import "github.com/google/cadvisor/client" 7 | 8 | client, err = client.NewClient("http://localhost:8080/") 9 | mInfo, err := client.MachineInfo() 10 | ``` 11 | 12 | Do you know of another cAdvisor client? Maybe in another language? Please let us know! We'd be happy to add a note on this page. 13 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/stat_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!windows,!freebsd 2 | 3 | package system 4 | 5 | import ( 6 | "syscall" 7 | ) 8 | 9 | // fromStatT creates a system.Stat_t type from a syscall.Stat_t type 10 | func fromStatT(s *syscall.Stat_t) (*Stat_t, error) { 11 | return &Stat_t{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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/console_freebsd.go: -------------------------------------------------------------------------------- 1 | // +build freebsd 2 | 3 | package libcontainer 4 | 5 | import ( 6 | "errors" 7 | ) 8 | 9 | // NewConsole returns an initalized console that can be used within a container by copying bytes 10 | // from the master side to the slave that is attached as the tty for the container's init process. 11 | func NewConsole(uid, gid int) (Console, error) { 12 | return nil, errors.New("libcontainer console is not supported on FreeBSD") 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/bulk_request.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012-2015 Oliver Eilhard. All rights reserved. 2 | // Use of this source code is governed by a MIT-license. 3 | // See http://olivere.mit-license.org/license.txt for details. 4 | 5 | package elastic 6 | 7 | import ( 8 | "fmt" 9 | ) 10 | 11 | // -- Bulkable request (index/update/delete) -- 12 | 13 | // Generic interface to bulkable requests. 14 | type BulkableRequest interface { 15 | fmt.Stringer 16 | Source() ([]string, error) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/process/process_windows_386.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package process 4 | 5 | type PROCESS_MEMORY_COUNTERS struct { 6 | CB uint32 7 | PageFaultCount uint32 8 | PeakWorkingSetSize uint32 9 | WorkingSetSize uint32 10 | QuotaPeakPagedPoolUsage uint32 11 | QuotaPagedPoolUsage uint32 12 | QuotaPeakNonPagedPoolUsage uint32 13 | QuotaNonPagedPoolUsage uint32 14 | PagefileUsage uint32 15 | PeakPagefileUsage uint32 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/process/process_windows_amd64.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package process 4 | 5 | type PROCESS_MEMORY_COUNTERS struct { 6 | CB uint32 7 | PageFaultCount uint32 8 | PeakWorkingSetSize uint64 9 | WorkingSetSize uint64 10 | QuotaPeakPagedPoolUsage uint64 11 | QuotaPagedPoolUsage uint64 12 | QuotaPeakNonPagedPoolUsage uint64 13 | QuotaNonPagedPoolUsage uint64 14 | PagefileUsage uint64 15 | PeakPagefileUsage uint64 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/altsrc/helpers_test.go: -------------------------------------------------------------------------------- 1 | package altsrc 2 | 3 | import ( 4 | "reflect" 5 | "testing" 6 | ) 7 | 8 | func expect(t *testing.T, a interface{}, b interface{}) { 9 | if !reflect.DeepEqual(b, a) { 10 | t.Errorf("Expected %#v (type %v) - Got %#v (type %v)", b, reflect.TypeOf(b), a, reflect.TypeOf(a)) 11 | } 12 | } 13 | 14 | func refute(t *testing.T, a interface{}, b interface{}) { 15 | if a == b { 16 | t.Errorf("Did not expect %v (type %v) - Got %v (type %v)", b, reflect.TypeOf(b), a, reflect.TypeOf(a)) 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/vendor/src/github.com/hashicorp/serf/website/LICENSE.md: -------------------------------------------------------------------------------- 1 | # Proprietary License 2 | 3 | This license is temporary while a more official one is drafted. However, 4 | this should make it clear: 5 | 6 | * The text contents of this website are MPL 2.0 licensed. 7 | 8 | * The design contents of this website are proprietary and may not be reproduced 9 | or reused in any way other than to run the Serf website locally. The license 10 | for the design is owned solely by HashiCorp, Inc. 11 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/vendor/src/github.com/hashicorp/consul/website/LICENSE.md: -------------------------------------------------------------------------------- 1 | # Proprietary License 2 | 3 | This license is temporary while a more official one is drafted. However, 4 | this should make it clear: 5 | 6 | * The text contents of this website are MPL 2.0 licensed. 7 | 8 | * The design contents of this website are proprietary and may not be reproduced 9 | or reused in any way other than to run the Consul website locally. The license 10 | for the design is owned solely by HashiCorp, Inc. 11 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/terminal_freebsd.go: -------------------------------------------------------------------------------- 1 | /* 2 | Go 1.2 doesn't include Termios for FreeBSD. This should be added in 1.3 and this could be merged with terminal_darwin. 3 | */ 4 | package logrus 5 | 6 | import ( 7 | "syscall" 8 | ) 9 | 10 | const ioctlReadTermios = syscall.TIOCGETA 11 | 12 | type Termios struct { 13 | Iflag uint32 14 | Oflag uint32 15 | Cflag uint32 16 | Lflag uint32 17 | Cc [20]uint8 18 | Ispeed uint32 19 | Ospeed uint32 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/godbus/dbus/conn_darwin.go: -------------------------------------------------------------------------------- 1 | package dbus 2 | 3 | import ( 4 | "errors" 5 | "os/exec" 6 | ) 7 | 8 | func sessionBusPlatform() (*Conn, error) { 9 | cmd := exec.Command("launchctl", "getenv", "DBUS_LAUNCHD_SESSION_BUS_SOCKET") 10 | b, err := cmd.CombinedOutput() 11 | 12 | if err != nil { 13 | return nil, err 14 | } 15 | 16 | if len(b) == 0 { 17 | return nil, errors.New("dbus: couldn't determine address of session bus") 18 | } 19 | 20 | return Dial("unix:path=" + string(b[:len(b)-1])) 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/.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 | /generator 25 | /cluster-test/cluster-test 26 | /cluster-test/*.log 27 | /cluster-test/es-chaos-monkey 28 | /spec 29 | /tmp 30 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/query.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012-2015 Oliver Eilhard. All rights reserved. 2 | // Use of this source code is governed by a MIT-license. 3 | // See http://olivere.mit-license.org/license.txt for details. 4 | 5 | package elastic 6 | 7 | // Represents the generic query interface. 8 | // A querys' only purpose is to return the 9 | // source of the query as a JSON-serializable 10 | // object. Returning a map[string]interface{} 11 | // will do. 12 | type Query interface { 13 | Source() interface{} 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/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.Stat_t type pertaining to that file. 11 | // 12 | // Throws an error if the file does not exist 13 | func Lstat(path string) (*Stat_t, 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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/golang/snappy/AUTHORS: -------------------------------------------------------------------------------- 1 | # This is the official list of Snappy-Go 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 | Damian Gryski 12 | Google Inc. 13 | Jan Mercl <0xjnml@gmail.com> 14 | Sebastien Binet 15 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/configs/namespaces_syscall_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!windows 2 | 3 | package configs 4 | 5 | func (n *Namespace) Syscall() int { 6 | panic("No namespace syscall support") 7 | return 0 8 | } 9 | 10 | // CloneFlags parses the container's Namespaces options to set the correct 11 | // flags on clone, unshare. This functions returns flags only for new namespaces. 12 | func (n *Namespaces) CloneFlags() uintptr { 13 | panic("No namespace syscall support") 14 | return uintptr(0) 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/golang.org/x/oauth2/vk/vk.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The oauth2 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 vk provides constants for using OAuth2 to access VK.com. 6 | package vk 7 | 8 | import ( 9 | "golang.org/x/oauth2" 10 | ) 11 | 12 | // Endpoint is VK's OAuth 2.0 endpoint. 13 | var Endpoint = oauth2.Endpoint{ 14 | AuthURL: "https://oauth.vk.com/authorize", 15 | TokenURL: "https://oauth.vk.com/access_token", 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/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 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: "{build}" 2 | 3 | os: Windows Server 2012 R2 4 | 5 | clone_folder: c:\gopath\src\github.com\urfave\cli 6 | 7 | environment: 8 | GOPATH: C:\gopath 9 | GOVERSION: 1.6 10 | PYTHON: C:\Python27-x64 11 | PYTHON_VERSION: 2.7.x 12 | PYTHON_ARCH: 64 13 | GFMXR_DEBUG: 1 14 | 15 | install: 16 | - set PATH=%GOPATH%\bin;C:\go\bin;%PATH% 17 | - go version 18 | - go env 19 | - go get github.com/urfave/gfmxr/... 20 | - go get -v -t ./... 21 | 22 | build_script: 23 | - python runtests vet 24 | - python runtests test 25 | - python runtests gfmxr 26 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_4: -------------------------------------------------------------------------------- 1 | 2 | # HELP request_duration_microseconds The response latency. 3 | # TYPE request_duration_microseconds histogram 4 | request_duration_microseconds_bucket{le="100"} 123 5 | request_duration_microseconds_bucket{le="120"} 412 6 | request_duration_microseconds_bucket{le="144"} 592 7 | request_duration_microseconds_bucket{le="172.8"} 1524 8 | request_duration_microseconds_bucket{le="+Inf"} 2693 9 | request_duration_microseconds_sum 1.7560473e+06 10 | request_duration_microseconds_count 2693 11 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | language: go 4 | 5 | go: 6 | - 1.5 7 | - tip 8 | 9 | env: 10 | matrix: 11 | - ES_VERSION=1.6.2 12 | - ES_VERSION=1.7.2 13 | 14 | before_script: 15 | - mkdir ${HOME}/elasticsearch 16 | - wget http://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-${ES_VERSION}.tar.gz 17 | - tar -xzf elasticsearch-${ES_VERSION}.tar.gz -C ${HOME}/elasticsearch 18 | - ${HOME}/elasticsearch/elasticsearch-${ES_VERSION}/bin/elasticsearch >& /dev/null & 19 | - sleep 15 20 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | sudo: false 4 | 5 | go: 6 | - 1.2.2 7 | - 1.3.3 8 | - 1.4 9 | - 1.5.4 10 | - 1.6.2 11 | - master 12 | 13 | matrix: 14 | allow_failures: 15 | - go: master 16 | include: 17 | - go: 1.6.2 18 | os: osx 19 | - go: 1.1.2 20 | install: go get -v . 21 | before_script: echo skipping gfmxr on $TRAVIS_GO_VERSION 22 | script: 23 | - ./runtests vet 24 | - ./runtests test 25 | 26 | before_script: 27 | - go get github.com/urfave/gfmxr/... 28 | 29 | script: 30 | - ./runtests vet 31 | - ./runtests test 32 | - ./runtests gfmxr 33 | -------------------------------------------------------------------------------- /templates/autoscaling/0/docker-compose.yml: -------------------------------------------------------------------------------- 1 | autoscale: 2 | image: rancher/autoscale:v0.0.1 3 | command: | 4 | service ${SERVICE} 5 | --min-cpu ${MIN_CPU_THRESHOLD_PCT} 6 | --max-cpu ${MAX_CPU_THRESHOLD_PCT} 7 | --min-mem ${MIN_MEM_THRESHOLD_MIB} 8 | --max-mem ${MAX_MEM_THRESHOLD_MIB} 9 | --and ${BOTH_THRESHOLDS} 10 | --period ${THRESHOLD_PERIOD} 11 | --warmup ${CONTAINER_WARMUP} 12 | --cooldown ${CONTAINER_COOLDOWN} 13 | --verbose ${VERBOSE} 14 | labels: 15 | io.rancher.container.create_agent: 'true' 16 | io.rancher.container.agent.role: environment -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Shopify/sarama/Makefile: -------------------------------------------------------------------------------- 1 | default: fmt vet errcheck test 2 | 3 | test: 4 | go test -v -timeout 60s -race ./... 5 | 6 | vet: 7 | go vet ./... 8 | 9 | errcheck: 10 | errcheck github.com/Shopify/sarama/... 11 | 12 | fmt: 13 | @if [ -n "$$(go fmt ./...)" ]; then echo 'Please run go fmt on your code.' && exit 1; fi 14 | 15 | install_dependencies: install_errcheck install_go_vet get 16 | 17 | install_errcheck: 18 | go get github.com/kisielk/errcheck 19 | 20 | install_go_vet: 21 | go get golang.org/x/tools/cmd/vet 22 | 23 | get: 24 | go get -t 25 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Shopify/sarama/response_header.go: -------------------------------------------------------------------------------- 1 | package sarama 2 | 3 | import "fmt" 4 | 5 | type responseHeader struct { 6 | length int32 7 | correlationID int32 8 | } 9 | 10 | func (r *responseHeader) decode(pd packetDecoder) (err error) { 11 | r.length, err = pd.getInt32() 12 | if err != nil { 13 | return err 14 | } 15 | if r.length <= 4 || r.length > MaxResponseSize { 16 | return PacketDecodingError{fmt.Sprintf("message of length %d too large or too small", r.length)} 17 | } 18 | 19 | r.correlationID, err = pd.getInt32() 20 | return err 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Shopify/sarama/Vagrantfile: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | 4 | # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! 5 | VAGRANTFILE_API_VERSION = "2" 6 | 7 | MEMORY = 3072 8 | 9 | Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| 10 | config.vm.box = "ubuntu/trusty64" 11 | 12 | config.vm.provision :shell, path: "vagrant/provision.sh" 13 | 14 | config.vm.network "private_network", ip: "192.168.100.67" 15 | 16 | config.vm.provider "virtualbox" do |v| 17 | v.memory = MEMORY 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/syndtr/gocapability/capability/capability_noop.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013, Suryandaru Triandana 2 | // All rights reserved. 3 | // 4 | // Use of this source code is governed by a BSD-style license that can be 5 | // found in the LICENSE file. 6 | 7 | // +build !linux 8 | 9 | package capability 10 | 11 | import "errors" 12 | 13 | func newPid(pid int) (Capabilities, error) { 14 | return nil, errors.New("not supported") 15 | } 16 | 17 | func newFile(path string) (Capabilities, error) { 18 | return nil, errors.New("not supported") 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/golang.org/x/oauth2/github/github.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The oauth2 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 github provides constants for using OAuth2 to access Github. 6 | package github 7 | 8 | import ( 9 | "golang.org/x/oauth2" 10 | ) 11 | 12 | // Endpoint is Github's OAuth 2.0 endpoint. 13 | var Endpoint = oauth2.Endpoint{ 14 | AuthURL: "https://github.com/login/oauth/authorize", 15 | TokenURL: "https://github.com/login/oauth/access_token", 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/suggester.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012-2015 Oliver Eilhard. All rights reserved. 2 | // Use of this source code is governed by a MIT-license. 3 | // See http://olivere.mit-license.org/license.txt for details. 4 | 5 | package elastic 6 | 7 | // Represents the generic suggester interface. 8 | // A suggester's only purpose is to return the 9 | // source of the query as a JSON-serializable 10 | // object. Returning a map[string]interface{} 11 | // will do. 12 | type Suggester interface { 13 | Name() string 14 | Source(includeName bool) interface{} 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/godbus/dbus/conn_other.go: -------------------------------------------------------------------------------- 1 | // +build !darwin 2 | 3 | package dbus 4 | 5 | import ( 6 | "bytes" 7 | "errors" 8 | "os/exec" 9 | ) 10 | 11 | func sessionBusPlatform() (*Conn, error) { 12 | cmd := exec.Command("dbus-launch") 13 | b, err := cmd.CombinedOutput() 14 | 15 | if err != nil { 16 | return nil, err 17 | } 18 | 19 | i := bytes.IndexByte(b, '=') 20 | j := bytes.IndexByte(b, '\n') 21 | 22 | if i == -1 || j == -1 { 23 | return nil, errors.New("dbus: couldn't determine address of session bus") 24 | } 25 | 26 | return Dial(string(b[i+1 : j])) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Shopify/sarama/consumer_metadata_request.go: -------------------------------------------------------------------------------- 1 | package sarama 2 | 3 | type ConsumerMetadataRequest struct { 4 | ConsumerGroup string 5 | } 6 | 7 | func (r *ConsumerMetadataRequest) encode(pe packetEncoder) error { 8 | return pe.putString(r.ConsumerGroup) 9 | } 10 | 11 | func (r *ConsumerMetadataRequest) decode(pd packetDecoder) (err error) { 12 | r.ConsumerGroup, err = pd.getString() 13 | return err 14 | } 15 | 16 | func (r *ConsumerMetadataRequest) key() int16 { 17 | return 10 18 | } 19 | 20 | func (r *ConsumerMetadataRequest) version() int16 { 21 | return 0 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Shopify/sarama/sync_group_response.go: -------------------------------------------------------------------------------- 1 | package sarama 2 | 3 | type SyncGroupResponse struct { 4 | Err KError 5 | MemberAssignment []byte 6 | } 7 | 8 | func (r *SyncGroupResponse) encode(pe packetEncoder) error { 9 | pe.putInt16(int16(r.Err)) 10 | return pe.putBytes(r.MemberAssignment) 11 | } 12 | 13 | func (r *SyncGroupResponse) decode(pd packetDecoder) (err error) { 14 | if kerr, err := pd.getInt16(); err != nil { 15 | return err 16 | } else { 17 | r.Err = KError(kerr) 18 | } 19 | 20 | r.MemberAssignment, err = pd.getBytes() 21 | return 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/syslog/README.md: -------------------------------------------------------------------------------- 1 | # Syslog Hooks for Logrus :walrus: 2 | 3 | ## Usage 4 | 5 | ```go 6 | import ( 7 | "log/syslog" 8 | "github.com/Sirupsen/logrus" 9 | logrus_syslog "github.com/Sirupsen/logrus/hooks/syslog" 10 | ) 11 | 12 | func main() { 13 | log := logrus.New() 14 | hook, err := logrus_syslog.NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "") 15 | 16 | if err == nil { 17 | log.Hooks.Add(hook) 18 | } 19 | } 20 | ``` 21 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/golang.org/x/oauth2/facebook/facebook.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The oauth2 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 facebook provides constants for using OAuth2 to access Facebook. 6 | package facebook 7 | 8 | import ( 9 | "golang.org/x/oauth2" 10 | ) 11 | 12 | // Endpoint is Facebook's OAuth 2.0 endpoint. 13 | var Endpoint = oauth2.Endpoint{ 14 | AuthURL: "https://www.facebook.com/dialog/oauth", 15 | TokenURL: "https://graph.facebook.com/oauth/access_token", 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/container_windows.go: -------------------------------------------------------------------------------- 1 | package libcontainer 2 | 3 | // State represents a running container's state 4 | type State struct { 5 | BaseState 6 | 7 | // Platform specific fields below here 8 | } 9 | 10 | // A libcontainer container object. 11 | // 12 | // Each container is thread-safe within the same process. Since a container can 13 | // be destroyed by a separate process, any function may return that the container 14 | // was not found. 15 | type Container interface { 16 | BaseContainer 17 | 18 | // Methods below here are platform specific 19 | 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/golang.org/x/oauth2/linkedin/linkedin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The oauth2 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 linkedin provides constants for using OAuth2 to access LinkedIn. 6 | package linkedin 7 | 8 | import ( 9 | "golang.org/x/oauth2" 10 | ) 11 | 12 | // Endpoint is LinkedIn's OAuth 2.0 endpoint. 13 | var Endpoint = oauth2.Endpoint{ 14 | AuthURL: "https://www.linkedin.com/uas/oauth2/authorization", 15 | TokenURL: "https://www.linkedin.com/uas/oauth2/accessToken", 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/vendor/src/github.com/BurntSushi/toml/COPYING: -------------------------------------------------------------------------------- 1 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 2 | Version 2, December 2004 3 | 4 | Copyright (C) 2004 Sam Hocevar 5 | 6 | Everyone is permitted to copy and distribute verbatim or modified 7 | copies of this license document, and changing it is allowed as long 8 | as the name is changed. 9 | 10 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 11 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 12 | 13 | 0. You just DO WHAT THE FUCK YOU WANT TO. 14 | 15 | -------------------------------------------------------------------------------- /templates/etcd/0/rancher-compose.yml: -------------------------------------------------------------------------------- 1 | .catalog: 2 | name: "Etcd" 3 | version: "2.3.6-rancher1" 4 | description: | 5 | Distributed highly-available key-value store 6 | minimum_rancher_version: "v0.46.0" 7 | questions: 8 | - variable: "REPLICAS" 9 | description: "Number of Etcd nodes. 3, 5, or 7 are good choices" 10 | label: "Number of Nodes:" 11 | required: true 12 | default: 3 13 | type: "int" 14 | etcd: 15 | scale: ${REPLICAS} 16 | health_check: 17 | port: 2379 18 | interval: 7500 19 | unhealthy_threshold: 2 20 | request_line: '/health' 21 | healthy_threshold: 2 22 | response_timeout: 5000 23 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/vendor/src/github.com/BurntSushi/toml/cmd/tomlv/COPYING: -------------------------------------------------------------------------------- 1 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 2 | Version 2, December 2004 3 | 4 | Copyright (C) 2004 Sam Hocevar 5 | 6 | Everyone is permitted to copy and distribute verbatim or modified 7 | copies of this license document, and changing it is allowed as long 8 | as the name is changed. 9 | 10 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 11 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 12 | 13 | 0. You just DO WHAT THE FUCK YOU WANT TO. 14 | 15 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/golang.org/x/net/context/ctxhttp/cancelreq_go14.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 !go1.5 6 | 7 | package ctxhttp 8 | 9 | import "net/http" 10 | 11 | type requestCanceler interface { 12 | CancelRequest(*http.Request) 13 | } 14 | 15 | func canceler(client *http.Client, req *http.Request) func() { 16 | rc, ok := client.Transport.(requestCanceler) 17 | if !ok { 18 | return func() {} 19 | } 20 | return func() { 21 | rc.CancelRequest(req) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/golang.org/x/oauth2/odnoklassniki/odnoklassniki.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The oauth2 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 odnoklassniki provides constants for using OAuth2 to access Odnoklassniki. 6 | package odnoklassniki 7 | 8 | import ( 9 | "golang.org/x/oauth2" 10 | ) 11 | 12 | // Endpoint is Odnoklassniki's OAuth 2.0 endpoint. 13 | var Endpoint = oauth2.Endpoint{ 14 | AuthURL: "https://www.odnoklassniki.ru/oauth/authorize", 15 | TokenURL: "https://api.odnoklassniki.ru/oauth/token.do", 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/vendor/src/github.com/BurntSushi/toml/cmd/toml-test-decoder/COPYING: -------------------------------------------------------------------------------- 1 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 2 | Version 2, December 2004 3 | 4 | Copyright (C) 2004 Sam Hocevar 5 | 6 | Everyone is permitted to copy and distribute verbatim or modified 7 | copies of this license document, and changing it is allowed as long 8 | as the name is changed. 9 | 10 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 11 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 12 | 13 | 0. You just DO WHAT THE FUCK YOU WANT TO. 14 | 15 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/vendor/src/github.com/BurntSushi/toml/cmd/toml-test-encoder/COPYING: -------------------------------------------------------------------------------- 1 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 2 | Version 2, December 2004 3 | 4 | Copyright (C) 2004 Sam Hocevar 5 | 6 | Everyone is permitted to copy and distribute verbatim or modified 7 | copies of this license document, and changing it is allowed as long 8 | as the name is changed. 9 | 10 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 11 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 12 | 13 | 0. You just DO WHAT THE FUCK YOU WANT TO. 14 | 15 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/altsrc/input_source_context.go: -------------------------------------------------------------------------------- 1 | package altsrc 2 | 3 | import ( 4 | "time" 5 | 6 | "github.com/urfave/cli" 7 | ) 8 | 9 | // InputSourceContext is an interface used to allow 10 | // other input sources to be implemented as needed. 11 | type InputSourceContext interface { 12 | Int(name string) (int, error) 13 | Duration(name string) (time.Duration, error) 14 | Float64(name string) (float64, error) 15 | String(name string) (string, error) 16 | StringSlice(name string) ([]string, error) 17 | IntSlice(name string) ([]int, error) 18 | Generic(name string) (cli.Generic, error) 19 | Bool(name string) (bool, error) 20 | BoolT(name string) (bool, error) 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/seccomp/seccomp_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux !cgo !seccomp 2 | 3 | package seccomp 4 | 5 | import ( 6 | "errors" 7 | 8 | "github.com/opencontainers/runc/libcontainer/configs" 9 | ) 10 | 11 | var ErrSeccompNotEnabled = errors.New("seccomp: config provided but seccomp not supported") 12 | 13 | // Seccomp not supported, do nothing 14 | func InitSeccomp(config *configs.Seccomp) error { 15 | if config != nil { 16 | return ErrSeccompNotEnabled 17 | } 18 | return nil 19 | } 20 | 21 | // IsEnabled returns false, because it is not supported. 22 | func IsEnabled() bool { 23 | return false 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/golang.org/x/oauth2/client_appengine.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The oauth2 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 appengine appenginevm 6 | 7 | // App Engine hooks. 8 | 9 | package oauth2 10 | 11 | import ( 12 | "net/http" 13 | 14 | "golang.org/x/net/context" 15 | "google.golang.org/appengine/urlfetch" 16 | ) 17 | 18 | func init() { 19 | registerContextClientFunc(contextClientAppEngine) 20 | } 21 | 22 | func contextClientAppEngine(ctx context.Context) (*http.Client, error) { 23 | return urlfetch.Client(ctx), nil 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/coverall.sh: -------------------------------------------------------------------------------- 1 | #/bin/sh 2 | 3 | # see http://www.songmu.jp/riji/entry/2015-01-15-goveralls-multi-package.html 4 | 5 | set -e 6 | # cleanup 7 | cleanup() { 8 | if [ $tmpprof != "" ] && [ -f $tmpprof ]; then 9 | rm -f $tmpprof 10 | fi 11 | exit 12 | } 13 | trap cleanup INT QUIT TERM EXIT 14 | 15 | # メインの処理 16 | prof=${1:-".profile.cov"} 17 | echo "mode: count" > $prof 18 | gopath1=$(echo $GOPATH | cut -d: -f1) 19 | for pkg in $(go list ./...); do 20 | tmpprof=$gopath1/src/$pkg/profile.tmp 21 | go test -covermode=count -coverprofile=$tmpprof $pkg 22 | if [ -f $tmpprof ]; then 23 | cat $tmpprof | tail -n +2 >> $prof 24 | rm $tmpprof 25 | fi 26 | done 27 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/build/boilerplate/boilerplate.sh.txt: -------------------------------------------------------------------------------- 1 | # Copyright YEAR Google Inc. All rights reserved. 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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/mount/mounter_linux.go: -------------------------------------------------------------------------------- 1 | package mount 2 | 3 | import ( 4 | "syscall" 5 | ) 6 | 7 | func mount(device, target, mType string, flag uintptr, data string) error { 8 | if err := syscall.Mount(device, target, mType, flag, data); err != nil { 9 | return err 10 | } 11 | 12 | // If we have a bind mount or remount, remount... 13 | if flag&syscall.MS_BIND == syscall.MS_BIND && flag&syscall.MS_RDONLY == syscall.MS_RDONLY { 14 | return syscall.Mount(device, target, mType, flag|syscall.MS_REMOUNT, data) 15 | } 16 | return nil 17 | } 18 | 19 | func unmount(target string, flag int) error { 20 | return syscall.Unmount(target, flag) 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/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_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_SETGID32, uintptr(gid), 0, 0) 21 | if e1 != 0 { 22 | err = e1 23 | } 24 | return 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/build/boilerplate/boilerplate.go.txt: -------------------------------------------------------------------------------- 1 | // Copyright YEAR Google Inc. All Rights Reserved. 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 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/cli.go: -------------------------------------------------------------------------------- 1 | // Package cli provides a minimal framework for creating and organizing command line 2 | // Go applications. cli is designed to be easy to understand and write, the most simple 3 | // cli application can be written as follows: 4 | // func main() { 5 | // cli.NewApp().Run(os.Args) 6 | // } 7 | // 8 | // Of course this application does not do much, so let's make this an actual application: 9 | // func main() { 10 | // app := cli.NewApp() 11 | // app.Name = "greet" 12 | // app.Usage = "say a greeting" 13 | // app.Action = func(c *cli.Context) error { 14 | // println("Greetings") 15 | // } 16 | // 17 | // app.Run(os.Args) 18 | // } 19 | package cli 20 | -------------------------------------------------------------------------------- /images/etcd/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.3 2 | 3 | RUN \ 4 | apk add --update bash ca-certificates && \ 5 | rm -rf /var/cache/apk/* && \ 6 | wget -q -O /usr/local/bin/giddyup https://github.com/cloudnautique/giddyup/releases/download/v0.11.0/giddyup && \ 7 | chmod +x /usr/local/bin/giddyup 8 | 9 | RUN \ 10 | wget -q -O - https://github.com/coreos/etcd/releases/download/v2.3.6/etcd-v2.3.6-linux-amd64.tar.gz | tar xzf - -C /tmp && \ 11 | mv /tmp/etcd-*/etcd /usr/local/bin/etcd && \ 12 | mv /tmp/etcd-*/etcdctl /usr/local/bin/etcdctl && \ 13 | rm -rf /tmp/etcd-* && rm -f /etcd-*.tar.gz 14 | 15 | ADD run.sh /run.sh 16 | 17 | ENTRYPOINT ["/run.sh"] 18 | CMD ["node"] 19 | 20 | ADD rancher-autoscale /usr/bin/autoscale 21 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Shopify/sarama/describe_groups_request.go: -------------------------------------------------------------------------------- 1 | package sarama 2 | 3 | type DescribeGroupsRequest struct { 4 | Groups []string 5 | } 6 | 7 | func (r *DescribeGroupsRequest) encode(pe packetEncoder) error { 8 | return pe.putStringArray(r.Groups) 9 | } 10 | 11 | func (r *DescribeGroupsRequest) decode(pd packetDecoder) (err error) { 12 | r.Groups, err = pd.getStringArray() 13 | return 14 | } 15 | 16 | func (r *DescribeGroupsRequest) key() int16 { 17 | return 15 18 | } 19 | 20 | func (r *DescribeGroupsRequest) version() int16 { 21 | return 0 22 | } 23 | 24 | func (r *DescribeGroupsRequest) AddGroup(group string) { 25 | r.Groups = append(r.Groups, group) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/aws/aws-sdk-go/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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/mount/flags_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!freebsd freebsd,!cgo 2 | 3 | package mount 4 | 5 | // These flags are unsupported. 6 | const ( 7 | BIND = 0 8 | DIRSYNC = 0 9 | MANDLOCK = 0 10 | NOATIME = 0 11 | NODEV = 0 12 | NODIRATIME = 0 13 | NOEXEC = 0 14 | NOSUID = 0 15 | UNBINDABLE = 0 16 | RUNBINDABLE = 0 17 | PRIVATE = 0 18 | RPRIVATE = 0 19 | SHARED = 0 20 | RSHARED = 0 21 | SLAVE = 0 22 | RSLAVE = 0 23 | RBIND = 0 24 | RELATIME = 0 25 | RELATIVE = 0 26 | REMOUNT = 0 27 | STRICTATIME = 0 28 | SYNCHRONOUS = 0 29 | RDONLY = 0 30 | ) 31 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/vendor/src/github.com/fluent/fluent-logger-golang/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Tatsuo Kaniwa 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. -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/nsenter/nsenter_gccgo.go: -------------------------------------------------------------------------------- 1 | // +build linux,gccgo 2 | 3 | package nsenter 4 | 5 | /* 6 | #cgo CFLAGS: -Wall 7 | extern void nsexec(); 8 | void __attribute__((constructor)) init(void) { 9 | nsexec(); 10 | } 11 | */ 12 | import "C" 13 | 14 | // AlwaysFalse is here to stay false 15 | // (and be exported so the compiler doesn't optimize out its reference) 16 | var AlwaysFalse bool 17 | 18 | func init() { 19 | if AlwaysFalse { 20 | // by referencing this C init() in a noop test, it will ensure the compiler 21 | // links in the C function. 22 | // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65134 23 | C.init() 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/stat_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package system 4 | 5 | import ( 6 | "os" 7 | "time" 8 | ) 9 | 10 | type Stat_t struct { 11 | name string 12 | size int64 13 | mode os.FileMode 14 | modTime time.Time 15 | isDir bool 16 | } 17 | 18 | func (s Stat_t) Name() string { 19 | return s.name 20 | } 21 | 22 | func (s Stat_t) Size() int64 { 23 | return s.size 24 | } 25 | 26 | func (s Stat_t) Mode() os.FileMode { 27 | return s.mode 28 | } 29 | 30 | func (s Stat_t) ModTime() time.Time { 31 | return s.modTime 32 | } 33 | 34 | func (s Stat_t) IsDir() bool { 35 | return s.isDir 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/build/boilerplate/boilerplate.py.txt: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # Copyright YEAR Google Inc. All Rights Reserved. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/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 7 | 8 | package logrus 9 | 10 | import ( 11 | "syscall" 12 | "unsafe" 13 | ) 14 | 15 | // IsTerminal returns true if the given file descriptor is a terminal. 16 | func IsTerminal() bool { 17 | fd := syscall.Stdout 18 | var termios Termios 19 | _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0) 20 | return err == 0 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive/changes_windows.go: -------------------------------------------------------------------------------- 1 | package archive 2 | 3 | import ( 4 | "github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system" 5 | ) 6 | 7 | func statDifferent(oldStat *system.Stat_t, newStat *system.Stat_t) bool { 8 | 9 | // Don't look at size for dirs, its not a good measure of change 10 | if oldStat.ModTime() != newStat.ModTime() || 11 | oldStat.Mode() != newStat.Mode() || 12 | oldStat.Size() != newStat.Size() && !oldStat.IsDir() { 13 | return true 14 | } 15 | return false 16 | } 17 | 18 | func (info *FileInfo) isDir() bool { 19 | return info.parent == nil || info.stat.IsDir() 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/utimes_freebsd.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import ( 4 | "syscall" 5 | "unsafe" 6 | ) 7 | 8 | func LUtimesNano(path string, ts []syscall.Timespec) error { 9 | var _path *byte 10 | _path, err := syscall.BytePtrFromString(path) 11 | if err != nil { 12 | return err 13 | } 14 | 15 | if _, _, err := syscall.Syscall(syscall.SYS_LUTIMES, uintptr(unsafe.Pointer(_path)), uintptr(unsafe.Pointer(&ts[0])), 0); err != 0 && err != syscall.ENOSYS { 16 | return err 17 | } 18 | 19 | return nil 20 | } 21 | 22 | func UtimesNano(path string, ts []syscall.Timespec) error { 23 | return syscall.UtimesNano(path, ts) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # (Unreleased) 2 | 3 | logrus/core: improve performance of text formatter by 40% 4 | logrus/core: expose `LevelHooks` type 5 | 6 | # 0.8.2 7 | 8 | logrus: fix more Fatal family functions 9 | 10 | # 0.8.1 11 | 12 | logrus: fix not exiting on `Fatalf` and `Fatalln` 13 | 14 | # 0.8.0 15 | 16 | logrus: defaults to stderr instead of stdout 17 | hooks/sentry: add special field for `*http.Request` 18 | formatter/text: ignore Windows for colors 19 | 20 | # 0.7.3 21 | 22 | formatter/\*: allow configuration of timestamp layout 23 | 24 | # 0.7.2 25 | 26 | formatter/text: Add configuration option for time format (#158) 27 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/container/libcontainer/testdata/procnetdev: -------------------------------------------------------------------------------- 1 | Inter-| Receive | Transmit 2 | face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed 3 | wlp4s0: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 4 | docker0: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 | lo: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 | em1: 315849 1172 0 0 0 0 0 0 315850 1173 0 0 0 0 0 0 -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/integration/tests/healthz/test_utils.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Google Inc. All Rights Reserved. 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 healthz 16 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/opts/ip.go: -------------------------------------------------------------------------------- 1 | package opts 2 | 3 | import ( 4 | "fmt" 5 | "net" 6 | ) 7 | 8 | // IpOpt type that hold an IP 9 | type IpOpt struct { 10 | *net.IP 11 | } 12 | 13 | func NewIpOpt(ref *net.IP, defaultVal string) *IpOpt { 14 | o := &IpOpt{ 15 | IP: ref, 16 | } 17 | o.Set(defaultVal) 18 | return o 19 | } 20 | 21 | func (o *IpOpt) Set(val string) error { 22 | ip := net.ParseIP(val) 23 | if ip == nil { 24 | return fmt.Errorf("%s is not an ip address", val) 25 | } 26 | *o.IP = ip 27 | return nil 28 | } 29 | 30 | func (o *IpOpt) String() string { 31 | if *o.IP == nil { 32 | return "" 33 | } 34 | return o.IP.String() 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/helpers_test.go: -------------------------------------------------------------------------------- 1 | package cli 2 | 3 | import ( 4 | "os" 5 | "reflect" 6 | "runtime" 7 | "strings" 8 | "testing" 9 | ) 10 | 11 | var ( 12 | wd, _ = os.Getwd() 13 | ) 14 | 15 | func expect(t *testing.T, a interface{}, b interface{}) { 16 | _, fn, line, _ := runtime.Caller(1) 17 | fn = strings.Replace(fn, wd+"/", "", -1) 18 | 19 | if !reflect.DeepEqual(a, b) { 20 | t.Errorf("(%s:%d) Expected %v (type %v) - Got %v (type %v)", fn, line, b, reflect.TypeOf(b), a, reflect.TypeOf(a)) 21 | } 22 | } 23 | 24 | func refute(t *testing.T, a interface{}, b interface{}) { 25 | if reflect.DeepEqual(a, b) { 26 | t.Errorf("Did not expect %v (type %v) - Got %v (type %v)", b, reflect.TypeOf(b), a, reflect.TypeOf(a)) 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/stretchr/objx/codegen/types_list.txt: -------------------------------------------------------------------------------- 1 | Interface,interface{},"something",nil,Inter 2 | Map,map[string]interface{},map[string]interface{}{"name":"Tyler"},nil,MSI 3 | ObjxMap,(Map),New(1),New(nil),ObjxMap 4 | Bool,bool,true,false,Bool 5 | String,string,"hello","",Str 6 | Int,int,1,0,Int 7 | Int8,int8,1,0,Int8 8 | Int16,int16,1,0,Int16 9 | Int32,int32,1,0,Int32 10 | Int64,int64,1,0,Int64 11 | Uint,uint,1,0,Uint 12 | Uint8,uint8,1,0,Uint8 13 | Uint16,uint16,1,0,Uint16 14 | Uint32,uint32,1,0,Uint32 15 | Uint64,uint64,1,0,Uint64 16 | Uintptr,uintptr,1,0,Uintptr 17 | Float32,float32,1,0,Float32 18 | Float64,float64,1,0,Float64 19 | Complex64,complex64,1,0,Complex64 20 | Complex128,complex128,1,0,Complex128 21 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/influxdb/influxdb/pkg/escape/strings.go: -------------------------------------------------------------------------------- 1 | package escape 2 | 3 | import "strings" 4 | 5 | var ( 6 | Codes = map[byte][]byte{ 7 | ',': []byte(`\,`), 8 | '"': []byte(`\"`), 9 | ' ': []byte(`\ `), 10 | '=': []byte(`\=`), 11 | } 12 | 13 | codesStr = map[string]string{} 14 | ) 15 | 16 | func init() { 17 | for k, v := range Codes { 18 | codesStr[string(k)] = string(v) 19 | } 20 | } 21 | 22 | func UnescapeString(in string) string { 23 | for b, esc := range codesStr { 24 | in = strings.Replace(in, esc, b, -1) 25 | } 26 | return in 27 | } 28 | 29 | func String(in string) string { 30 | for b, esc := range codesStr { 31 | in = strings.Replace(in, b, esc, -1) 32 | } 33 | return in 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/load/load.go: -------------------------------------------------------------------------------- 1 | package load 2 | 3 | import ( 4 | "encoding/json" 5 | 6 | "github.com/shirou/gopsutil/internal/common" 7 | ) 8 | 9 | var invoke common.Invoker 10 | 11 | func init() { 12 | invoke = common.Invoke{} 13 | } 14 | 15 | type AvgStat struct { 16 | Load1 float64 `json:"load1"` 17 | Load5 float64 `json:"load5"` 18 | Load15 float64 `json:"load15"` 19 | } 20 | 21 | func (l AvgStat) String() string { 22 | s, _ := json.Marshal(l) 23 | return string(s) 24 | } 25 | 26 | type MiscStat struct { 27 | ProcsRunning int `json:"procsRunning"` 28 | ProcsBlocked int `json:"procsBlocked"` 29 | Ctxt int `json:"ctxt"` 30 | } 31 | 32 | func (m MiscStat) String() string { 33 | s, _ := json.Marshal(m) 34 | return string(s) 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/godbus/dbus/auth_external.go: -------------------------------------------------------------------------------- 1 | package dbus 2 | 3 | import ( 4 | "encoding/hex" 5 | ) 6 | 7 | // AuthExternal returns an Auth that authenticates as the given user with the 8 | // EXTERNAL mechanism. 9 | func AuthExternal(user string) Auth { 10 | return authExternal{user} 11 | } 12 | 13 | // AuthExternal implements the EXTERNAL authentication mechanism. 14 | type authExternal struct { 15 | user string 16 | } 17 | 18 | func (a authExternal) FirstData() ([]byte, []byte, AuthStatus) { 19 | b := make([]byte, 2*len(a.user)) 20 | hex.Encode(b, []byte(a.user)) 21 | return []byte("EXTERNAL"), b, AuthOk 22 | } 23 | 24 | func (a authExternal) HandleData(b []byte) ([]byte, AuthStatus) { 25 | return nil, AuthError 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/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 7 | 8 | package logrus 9 | 10 | import ( 11 | "syscall" 12 | "unsafe" 13 | ) 14 | 15 | // IsTerminal returns true if the given file descriptor is a terminal. 16 | func IsTerminal() bool { 17 | fd := syscall.Stdout 18 | var termios Termios 19 | _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0) 20 | return err == 0 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Sirupsen/logrus/writer.go: -------------------------------------------------------------------------------- 1 | package logrus 2 | 3 | import ( 4 | "bufio" 5 | "io" 6 | "runtime" 7 | ) 8 | 9 | func (logger *Logger) Writer() *io.PipeWriter { 10 | reader, writer := io.Pipe() 11 | 12 | go logger.writerScanner(reader) 13 | runtime.SetFinalizer(writer, writerFinalizer) 14 | 15 | return writer 16 | } 17 | 18 | func (logger *Logger) writerScanner(reader *io.PipeReader) { 19 | scanner := bufio.NewScanner(reader) 20 | for scanner.Scan() { 21 | logger.Print(scanner.Text()) 22 | } 23 | if err := scanner.Err(); err != nil { 24 | logger.Errorf("Error while reading from Writer: %s", err) 25 | } 26 | reader.Close() 27 | } 28 | 29 | func writerFinalizer(writer *io.PipeWriter) { 30 | writer.Close() 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/godbus/dbus/introspect/call.go: -------------------------------------------------------------------------------- 1 | package introspect 2 | 3 | import ( 4 | "encoding/xml" 5 | "github.com/godbus/dbus" 6 | "strings" 7 | ) 8 | 9 | // Call calls org.freedesktop.Introspectable.Introspect on a remote object 10 | // and returns the introspection data. 11 | func Call(o dbus.BusObject) (*Node, error) { 12 | var xmldata string 13 | var node Node 14 | 15 | err := o.Call("org.freedesktop.DBus.Introspectable.Introspect", 0).Store(&xmldata) 16 | if err != nil { 17 | return nil, err 18 | } 19 | err = xml.NewDecoder(strings.NewReader(xmldata)).Decode(&node) 20 | if err != nil { 21 | return nil, err 22 | } 23 | if node.Name == "" { 24 | node.Name = string(o.Path()) 25 | } 26 | return &node, nil 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/abbot/go-http-auth/misc.go: -------------------------------------------------------------------------------- 1 | package auth 2 | 3 | import "encoding/base64" 4 | import "crypto/md5" 5 | import "crypto/rand" 6 | import "fmt" 7 | 8 | /* 9 | Return a random 16-byte base64 alphabet string 10 | */ 11 | func RandomKey() string { 12 | k := make([]byte, 12) 13 | for bytes := 0; bytes < len(k); { 14 | n, err := rand.Read(k[bytes:]) 15 | if err != nil { 16 | panic("rand.Read() failed") 17 | } 18 | bytes += n 19 | } 20 | return base64.StdEncoding.EncodeToString(k) 21 | } 22 | 23 | /* 24 | H function for MD5 algorithm (returns a lower-case hex MD5 digest) 25 | */ 26 | func H(data string) string { 27 | digest := md5.New() 28 | digest.Write([]byte(data)) 29 | return fmt.Sprintf("%x", digest.Sum(nil)) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/NOTICE: -------------------------------------------------------------------------------- 1 | Docker 2 | Copyright 2012-2015 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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/jmespath/go-jmespath/compliance/current.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "given": { 4 | "foo": [{"name": "a"}, {"name": "b"}], 5 | "bar": {"baz": "qux"} 6 | }, 7 | "cases": [ 8 | { 9 | "expression": "@", 10 | "result": { 11 | "foo": [{"name": "a"}, {"name": "b"}], 12 | "bar": {"baz": "qux"} 13 | } 14 | }, 15 | { 16 | "expression": "@.bar", 17 | "result": {"baz": "qux"} 18 | }, 19 | { 20 | "expression": "@.foo[0]", 21 | "result": {"name": "a"} 22 | } 23 | ] 24 | } 25 | ] 26 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/mktypes.sh: -------------------------------------------------------------------------------- 1 | 2 | DIRS="cpu disk docker host load mem net process" 3 | 4 | GOOS=`uname | tr '[:upper:]' '[:lower:]'` 5 | ARCH=`uname -m` 6 | 7 | case $ARCH in 8 | amd64) 9 | GOARCH="amd64" 10 | ;; 11 | x86_64) 12 | GOARCH="amd64" 13 | ;; 14 | i386) 15 | GOARCH="386" 16 | ;; 17 | i686) 18 | GOARCH="386" 19 | ;; 20 | arm) 21 | GOARCH="arm" 22 | ;; 23 | *) 24 | echo "unknown arch: $ARCH" 25 | exit 1 26 | esac 27 | 28 | for DIR in $DIRS 29 | do 30 | if [ -e ${DIR}/types_${GOOS}.go ]; then 31 | echo "// +build $GOOS" > ${DIR}/${DIR}_${GOOS}_${GOARCH}.go 32 | echo "// +build $GOARCH" >> ${DIR}/${DIR}_${GOOS}_${GOARCH}.go 33 | go tool cgo -godefs ${DIR}/types_${GOOS}.go >> ${DIR}/${DIR}_${GOOS}_${GOARCH}.go 34 | fi 35 | done 36 | 37 | 38 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/cgroups/fs/name.go: -------------------------------------------------------------------------------- 1 | // +build linux 2 | 3 | package fs 4 | 5 | import ( 6 | "github.com/opencontainers/runc/libcontainer/cgroups" 7 | "github.com/opencontainers/runc/libcontainer/configs" 8 | ) 9 | 10 | type NameGroup struct { 11 | GroupName string 12 | } 13 | 14 | func (s *NameGroup) Name() string { 15 | return s.GroupName 16 | } 17 | 18 | func (s *NameGroup) Apply(d *cgroupData) error { 19 | return nil 20 | } 21 | 22 | func (s *NameGroup) Set(path string, cgroup *configs.Cgroup) error { 23 | return nil 24 | } 25 | 26 | func (s *NameGroup) Remove(d *cgroupData) error { 27 | return nil 28 | } 29 | 30 | func (s *NameGroup) GetStats(path string, stats *cgroups.Stats) error { 31 | return nil 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/docs/deploy.md: -------------------------------------------------------------------------------- 1 | # Building and Deploying the cAdvisor Docker Container 2 | 3 | ## Building 4 | 5 | Building the cAdvisor Docker container is simple, just run: 6 | 7 | ``` 8 | $ ./deploy/build.sh 9 | ``` 10 | 11 | Which will statically build the cAdvisor binary and then build the Docker image. The resulting Docker image will be called `google/cadvisor:canary`. This image is very bare, containing the cAdvisor binary and nothing else. 12 | 13 | ## Deploying 14 | 15 | All cAdvisor releases are tagged and correspond to a Docker image. The latest supported release uses the `latest` tag. We have a `beta` and `canary` tag for pre-release versions with newer features. You can see more details about this in the cAdvisor Docker [registry](https://registry.hub.docker.com/u/google/cadvisor/) page. 16 | -------------------------------------------------------------------------------- /vendor/github.com/rancher/go-rancher-metadata/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "time" 5 | 6 | "github.com/Sirupsen/logrus" 7 | "github.com/rancher/go-rancher-metadata/metadata" 8 | ) 9 | 10 | const ( 11 | metadataUrl = "http://rancher-metadata/2015-12-19" 12 | ) 13 | 14 | func main() { 15 | m := metadata.NewClient(metadataUrl) 16 | 17 | version := "init" 18 | 19 | for { 20 | newVersion, err := m.GetVersion() 21 | if err != nil { 22 | logrus.Errorf("Error reading metadata version: %v", err) 23 | } else if version == newVersion { 24 | logrus.Debug("No changes in metadata version") 25 | } else { 26 | logrus.Debugf("Metadata version has changed, oldVersion=[%s], newVersion=[%s]", version, newVersion) 27 | version = newVersion 28 | } 29 | time.Sleep(5 * time.Second) 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/testing/data/Dockerfile: -------------------------------------------------------------------------------- 1 | # this file describes how to build tsuru python image 2 | # to run it: 3 | # 1- install docker 4 | # 2- run: $ docker build -t tsuru/python https://raw.github.com/tsuru/basebuilder/master/python/Dockerfile 5 | 6 | from base:ubuntu-quantal 7 | run apt-get install wget -y --force-yes 8 | run wget http://github.com/tsuru/basebuilder/tarball/master -O basebuilder.tar.gz --no-check-certificate 9 | run mkdir /var/lib/tsuru 10 | run tar -xvf basebuilder.tar.gz -C /var/lib/tsuru --strip 1 11 | run cp /var/lib/tsuru/python/deploy /var/lib/tsuru 12 | run cp /var/lib/tsuru/base/restart /var/lib/tsuru 13 | run cp /var/lib/tsuru/base/start /var/lib/tsuru 14 | run /var/lib/tsuru/base/install 15 | run /var/lib/tsuru/base/setup 16 | -------------------------------------------------------------------------------- /vendor/github.com/rancher/go-rancher-metadata/metadata/change.go: -------------------------------------------------------------------------------- 1 | package metadata 2 | 3 | import ( 4 | "time" 5 | 6 | "github.com/Sirupsen/logrus" 7 | ) 8 | 9 | func (m *Client) OnChange(intervalSeconds int, do func(string)) { 10 | interval := time.Duration(intervalSeconds) 11 | version := "init" 12 | 13 | for { 14 | newVersion, err := m.GetVersion() 15 | if err != nil { 16 | logrus.Errorf("Error reading metadata version: %v", err) 17 | time.Sleep(interval * time.Second) 18 | } else if version == newVersion { 19 | logrus.Debug("No changes in metadata version") 20 | time.Sleep(interval * time.Second) 21 | } else { 22 | logrus.Debugf("Metadata Version has been changed. Old version: %s. New version: %s.", version, newVersion) 23 | version = newVersion 24 | do(newVersion) 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/writer.go: -------------------------------------------------------------------------------- 1 | package logrus 2 | 3 | import ( 4 | "bufio" 5 | "io" 6 | "runtime" 7 | ) 8 | 9 | func (logger *Logger) Writer() *io.PipeWriter { 10 | reader, writer := io.Pipe() 11 | 12 | go logger.writerScanner(reader) 13 | runtime.SetFinalizer(writer, writerFinalizer) 14 | 15 | return writer 16 | } 17 | 18 | func (logger *Logger) writerScanner(reader *io.PipeReader) { 19 | scanner := bufio.NewScanner(reader) 20 | for scanner.Scan() { 21 | logger.Print(scanner.Text()) 22 | } 23 | if err := scanner.Err(); err != nil { 24 | logger.Errorf("Error while reading from Writer: %s", err) 25 | } 26 | reader.Close() 27 | } 28 | 29 | func writerFinalizer(writer *io.PipeWriter) { 30 | writer.Close() 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Shopify/sarama/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.4.3 4 | - 1.5.2 5 | 6 | env: 7 | global: 8 | - KAFKA_PEERS=localhost:9091,localhost:9092,localhost:9093,localhost:9094,localhost:9095 9 | - TOXIPROXY_ADDR=http://localhost:8474 10 | - KAFKA_INSTALL_ROOT=/home/travis/kafka 11 | - KAFKA_HOSTNAME=localhost 12 | - DEBUG=true 13 | matrix: 14 | - KAFKA_VERSION=0.8.1.1 15 | - KAFKA_VERSION=0.8.2.2 16 | - KAFKA_VERSION=0.9.0.0 17 | 18 | before_install: 19 | - export REPOSITORY_ROOT=${TRAVIS_BUILD_DIR} 20 | - vagrant/install_cluster.sh 21 | - vagrant/boot_cluster.sh 22 | - vagrant/create_topics.sh 23 | 24 | install: 25 | - make install_dependencies 26 | 27 | script: 28 | - make test 29 | - make vet 30 | - make errcheck 31 | - make fmt 32 | 33 | sudo: false 34 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/console_windows.go: -------------------------------------------------------------------------------- 1 | package libcontainer 2 | 3 | // NewConsole returns an initalized console that can be used within a container 4 | func NewConsole(uid, gid int) (Console, error) { 5 | return &windowsConsole{}, nil 6 | } 7 | 8 | // windowsConsole is a Windows psuedo TTY for use within a container. 9 | type windowsConsole struct { 10 | } 11 | 12 | func (c *windowsConsole) Fd() uintptr { 13 | return 0 14 | } 15 | 16 | func (c *windowsConsole) Path() string { 17 | return "" 18 | } 19 | 20 | func (c *windowsConsole) Read(b []byte) (int, error) { 21 | return 0, nil 22 | } 23 | 24 | func (c *windowsConsole) Write(b []byte) (int, error) { 25 | return 0, nil 26 | } 27 | 28 | func (c *windowsConsole) Close() error { 29 | return nil 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/docs/development/integration_testing.md: -------------------------------------------------------------------------------- 1 | # Integration Testing cAdvisor 2 | 3 | The cAdvisor integration tests can be found in `integration/tests`. These run queries on a running cAdvisor. To run these tests: 4 | 5 | ``` 6 | $ godep go run integration/runner/runner.go -port=PORT 7 | ``` 8 | 9 | This will build a cAdvisor from the current repository and start it on the target machine before running the tests. 10 | 11 | To simply run the tests against an existing cAdvisor: 12 | 13 | ``` 14 | $ godep go test github.com/google/cadvisor/integration/tests/... -host=HOST -port=PORT 15 | ``` 16 | 17 | Note that `HOST` and `PORT` default to `localhost` and `8080` respectively. 18 | Today We only support remote execution in Google Compute Engine since that is where we run our continuous builds. 19 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/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 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 the given file descriptor is a terminal. 22 | func IsTerminal() bool { 23 | fd := syscall.Stdout 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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/godbus/dbus/transport_unixcred_linux.go: -------------------------------------------------------------------------------- 1 | // The UnixCredentials system call is currently only implemented on Linux 2 | // http://golang.org/src/pkg/syscall/sockcmsg_linux.go 3 | // https://golang.org/s/go1.4-syscall 4 | // http://code.google.com/p/go/source/browse/unix/sockcmsg_linux.go?repo=sys 5 | 6 | package dbus 7 | 8 | import ( 9 | "io" 10 | "os" 11 | "syscall" 12 | ) 13 | 14 | func (t *unixTransport) SendNullByte() error { 15 | ucred := &syscall.Ucred{Pid: int32(os.Getpid()), Uid: uint32(os.Getuid()), Gid: uint32(os.Getgid())} 16 | b := syscall.UnixCredentials(ucred) 17 | _, oobn, err := t.UnixConn.WriteMsgUnix([]byte{0}, b, nil) 18 | if err != nil { 19 | return err 20 | } 21 | if oobn != len(b) { 22 | return io.ErrShortWrite 23 | } 24 | return nil 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_3: -------------------------------------------------------------------------------- 1 | 2 | # TYPE my_summary summary 3 | my_summary{n1="val1",quantile="0.5"} 110 4 | decoy -1 -2 5 | my_summary{n1="val1",quantile="0.9"} 140 1 6 | my_summary_count{n1="val1"} 42 7 | # Latest timestamp wins in case of a summary. 8 | my_summary_sum{n1="val1"} 4711 2 9 | fake_sum{n1="val1"} 2001 10 | # TYPE another_summary summary 11 | another_summary_count{n2="val2",n1="val1"} 20 12 | my_summary_count{n2="val2",n1="val1"} 5 5 13 | another_summary{n1="val1",n2="val2",quantile=".3"} -1.2 14 | my_summary_sum{n1="val2"} 08 15 15 | my_summary{n1="val3", quantile="0.2"} 4711 16 | my_summary{n1="val1",n2="val2",quantile="-12.34",} NaN 17 | # some 18 | # funny comments 19 | # HELP 20 | # HELP 21 | # HELP my_summary 22 | # HELP my_summary 23 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/deploy/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright 2015 Google Inc. All rights reserved. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | set -e 18 | set -x 19 | 20 | godep go build -a github.com/google/cadvisor 21 | 22 | docker build -t google/cadvisor:beta . 23 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/windows_memo.rst: -------------------------------------------------------------------------------- 1 | Windows memo 2 | ===================== 3 | 4 | Size 5 | ---------- 6 | 7 | DWORD 8 | 32-bit unsigned integer 9 | DWORDLONG 10 | 64-bit unsigned integer 11 | DWORD_PTR 12 | unsigned long type for pointer precision 13 | DWORD32 14 | 32-bit unsigned integer 15 | DWORD64 16 | 64-bit unsigned integer 17 | HALF_PTR 18 | _WIN64 = int, else short 19 | INT 20 | 32-bit signed integer 21 | INT_PTR 22 | _WIN64 = __int64 else int 23 | LONG 24 | 32-bit signed integer 25 | LONGLONG 26 | 64-bit signed integer 27 | LONG_PTR 28 | _WIN64 = __int64 else long 29 | SHORT 30 | 16-bit integer 31 | SIZE_T 32 | maximum number of bytes to which a pointer can point. typedef ULONG_PTR SIZE_T; 33 | SSIZE_T 34 | signed version of SIZE_T. typedef LONG_PTR SSIZE_T; 35 | WORD 36 | 16-bit unsigned integer -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/mknod.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package system 4 | 5 | import ( 6 | "syscall" 7 | ) 8 | 9 | // Mknod creates a filesystem node (file, device special file or named pipe) named path 10 | // with attributes specified by mode and dev 11 | func Mknod(path string, mode uint32, dev int) error { 12 | return syscall.Mknod(path, mode, dev) 13 | } 14 | 15 | // Linux device nodes are a bit weird due to backwards compat with 16 bit device nodes. 16 | // They are, from low to high: the lower 8 bits of the minor, then 12 bits of the major, 17 | // then the top 12 bits of the minor 18 | func Mkdev(major int64, minor int64) uint32 { 19 | return uint32(((minor & 0xfff00) << 12) | ((major & 0xfff) << 8) | (minor & 0xff)) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/stacktrace/capture.go: -------------------------------------------------------------------------------- 1 | package stacktrace 2 | 3 | import "runtime" 4 | 5 | // Caputure captures a stacktrace for the current calling go program 6 | // 7 | // skip is the number of frames to skip 8 | func Capture(userSkip int) Stacktrace { 9 | var ( 10 | skip = userSkip + 1 // add one for our own function 11 | frames []Frame 12 | prevPc uintptr = 0 13 | ) 14 | for i := skip; ; i++ { 15 | pc, file, line, ok := runtime.Caller(i) 16 | //detect if caller is repeated to avoid loop, gccgo 17 | //currently runs into a loop without this check 18 | if !ok || pc == prevPc { 19 | break 20 | } 21 | frames = append(frames, NewFrame(pc, file, line)) 22 | prevPc = pc 23 | } 24 | return Stacktrace{ 25 | Frames: frames, 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/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) (*Stat_t, error) { 9 | return &Stat_t{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) (*Stat_t, 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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/matttproud/golang_protobuf_extensions/pbutil/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 Matt T. Proud 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 pbutil provides record length-delimited Protocol Buffer streaming. 16 | package pbutil 17 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Sirupsen/logrus/examples/hook/hook.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "github.com/Sirupsen/logrus" 5 | "github.com/Sirupsen/logrus/hooks/airbrake" 6 | ) 7 | 8 | var log = logrus.New() 9 | 10 | func init() { 11 | log.Formatter = new(logrus.TextFormatter) // default 12 | log.Hooks.Add(airbrake.NewHook("https://example.com", "xyz", "development")) 13 | } 14 | 15 | func main() { 16 | log.WithFields(logrus.Fields{ 17 | "animal": "walrus", 18 | "size": 10, 19 | }).Info("A group of walrus emerges from the ocean") 20 | 21 | log.WithFields(logrus.Fields{ 22 | "omg": true, 23 | "number": 122, 24 | }).Warn("The group's number increased tremendously!") 25 | 26 | log.WithFields(logrus.Fields{ 27 | "omg": true, 28 | "number": 100, 29 | }).Fatal("The ice breaks!") 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Shopify/sarama/tools/README.md: -------------------------------------------------------------------------------- 1 | # Sarama tools 2 | 3 | This folder contains applications that are useful for exploration of your Kafka cluster, or instrumentation. 4 | Some of these tools mirror tools that ship with Kafka, but these tools won't require installing the JVM to function. 5 | 6 | - [kafka-console-producer](./kafka-console-producer): a command line tool to produce a single message to your Kafka custer. 7 | - [kafka-console-partitionconsumer](./kafka-console-partitionconsumer): (deprecated) a command line tool to consume a single partition of a topic on your Kafka cluster. 8 | - [kafka-console-consumer](./kafka-console-consumer): a command line tool to consume arbitrary partitions of a topic on your Kafka cluster. 9 | 10 | To install all tools, run `go get github.com/Shopify/sarama/tools/...` 11 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/abbot/go-http-auth/examples/basic.go: -------------------------------------------------------------------------------- 1 | // +build ignore 2 | 3 | /* 4 | Example application using Basic auth 5 | 6 | Build with: 7 | 8 | go build basic.go 9 | */ 10 | 11 | package main 12 | 13 | import ( 14 | auth ".." 15 | "fmt" 16 | "net/http" 17 | ) 18 | 19 | func Secret(user, realm string) string { 20 | if user == "john" { 21 | // password is "hello" 22 | return "$1$dlPL2MqE$oQmn16q49SqdmhenQuNgs1" 23 | } 24 | return "" 25 | } 26 | 27 | func handle(w http.ResponseWriter, r *auth.AuthenticatedRequest) { 28 | fmt.Fprintf(w, "

Hello, %s!

", r.Username) 29 | } 30 | 31 | func main() { 32 | authenticator := auth.NewBasicAuthenticator("example.com", Secret) 33 | http.HandleFunc("/", authenticator.Wrap(handle)) 34 | http.ListenAndServe(":8080", nil) 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/host/types_linux.go: -------------------------------------------------------------------------------- 1 | // +build ignore 2 | 3 | /* 4 | Input to cgo -godefs. 5 | */ 6 | 7 | package host 8 | 9 | /* 10 | #include 11 | #include 12 | 13 | enum { 14 | sizeofPtr = sizeof(void*), 15 | }; 16 | 17 | */ 18 | import "C" 19 | 20 | // Machine characteristics; for internal use. 21 | 22 | const ( 23 | sizeofPtr = C.sizeofPtr 24 | sizeofShort = C.sizeof_short 25 | sizeofInt = C.sizeof_int 26 | sizeofLong = C.sizeof_long 27 | sizeofLongLong = C.sizeof_longlong 28 | sizeOfUtmp = C.sizeof_struct_utmp 29 | ) 30 | 31 | // Basic types 32 | 33 | type ( 34 | _C_short C.short 35 | _C_int C.int 36 | _C_long C.long 37 | _C_long_long C.longlong 38 | ) 39 | 40 | type utmp C.struct_utmp 41 | type exit_status C.struct_exit_status 42 | type timeval C.struct_timeval 43 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Shopify/sarama/leave_group_request.go: -------------------------------------------------------------------------------- 1 | package sarama 2 | 3 | type LeaveGroupRequest struct { 4 | GroupId string 5 | MemberId string 6 | } 7 | 8 | func (r *LeaveGroupRequest) encode(pe packetEncoder) error { 9 | if err := pe.putString(r.GroupId); err != nil { 10 | return err 11 | } 12 | if err := pe.putString(r.MemberId); err != nil { 13 | return err 14 | } 15 | 16 | return nil 17 | } 18 | 19 | func (r *LeaveGroupRequest) decode(pd packetDecoder) (err error) { 20 | if r.GroupId, err = pd.getString(); err != nil { 21 | return 22 | } 23 | if r.MemberId, err = pd.getString(); err != nil { 24 | return 25 | } 26 | 27 | return nil 28 | } 29 | 30 | func (r *LeaveGroupRequest) key() int16 { 31 | return 13 32 | } 33 | 34 | func (r *LeaveGroupRequest) version() int16 { 35 | return 0 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/abbot/go-http-auth/examples/digest.go: -------------------------------------------------------------------------------- 1 | // +build ignore 2 | 3 | /* 4 | Example application using Digest auth 5 | 6 | Build with: 7 | 8 | go build digest.go 9 | */ 10 | 11 | package main 12 | 13 | import ( 14 | auth ".." 15 | "fmt" 16 | "net/http" 17 | ) 18 | 19 | func Secret(user, realm string) string { 20 | if user == "john" { 21 | // password is "hello" 22 | return "b98e16cbc3d01734b264adba7baa3bf9" 23 | } 24 | return "" 25 | } 26 | 27 | func handle(w http.ResponseWriter, r *auth.AuthenticatedRequest) { 28 | fmt.Fprintf(w, "

Hello, %s!

", r.Username) 29 | } 30 | 31 | func main() { 32 | authenticator := auth.NewDigestAuthenticator("example.com", Secret) 33 | http.HandleFunc("/", authenticator.Wrap(handle)) 34 | http.ListenAndServe(":8080", nil) 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/common/model/model.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Prometheus Authors 2 | // Licensed under the Apache License, Version 2.0 (the "License"); 3 | // you may not use this file except in compliance with the License. 4 | // You may obtain a copy of the License at 5 | // 6 | // http://www.apache.org/licenses/LICENSE-2.0 7 | // 8 | // Unless required by applicable law or agreed to in writing, software 9 | // distributed under the License is distributed on an "AS IS" BASIS, 10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | // See the License for the specific language governing permissions and 12 | // limitations under the License. 13 | 14 | // Package model contains common data structures that are shared across 15 | // Prometheus componenets and libraries. 16 | package model 17 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/host/host_freebsd_386.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs types_freebsd.go 3 | 4 | package host 5 | 6 | const ( 7 | sizeofPtr = 0x4 8 | sizeofShort = 0x2 9 | sizeofInt = 0x4 10 | sizeofLong = 0x4 11 | sizeofLongLong = 0x8 12 | sizeOfUtmpx = 197 // TODO why should 197 13 | ) 14 | 15 | type ( 16 | _C_short int16 17 | _C_int int32 18 | _C_long int32 19 | _C_long_long int64 20 | ) 21 | 22 | type Utmp struct { 23 | Line [8]int8 24 | Name [16]int8 25 | Host [16]int8 26 | Time int32 27 | } 28 | 29 | type Utmpx struct { 30 | Type int16 31 | Tv Timeval 32 | Id [8]int8 33 | Pid int32 34 | User [32]int8 35 | Line [16]int8 36 | Host [125]int8 37 | // X__ut_spare [64]int8 38 | } 39 | 40 | type Timeval struct { 41 | Sec [4]byte 42 | Usec [3]byte 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/search_filters_match_all.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012-2015 Oliver Eilhard. All rights reserved. 2 | // Use of this source code is governed by a MIT-license. 3 | // See http://olivere.mit-license.org/license.txt for details. 4 | 5 | package elastic 6 | 7 | // A filter that matches on all documents. 8 | // For details, see: 9 | // http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-match-all-filter.html 10 | type MatchAllFilter struct { 11 | Filter 12 | } 13 | 14 | func NewMatchAllFilter() MatchAllFilter { 15 | return MatchAllFilter{} 16 | } 17 | 18 | func (f MatchAllFilter) Source() interface{} { 19 | // { 20 | // "match_all" : {} 21 | // } 22 | source := make(map[string]interface{}) 23 | source["match_all"] = make(map[string]interface{}) 24 | return source 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: help check 2 | .DEFAULT_GOAL := help 3 | 4 | SUBPKGS=cpu disk docker host internal load mem net process 5 | 6 | help: ## Show help 7 | @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' 8 | 9 | check: ## Check 10 | errcheck -ignore="Close|Run|Write" ./... 11 | golint ./... | egrep -v 'underscores|HttpOnly|should have comment|comment on exported|CamelCase|VM|UID' 12 | 13 | build_test: ## test only buildable 14 | GOOS=linux go test ./... | grep -v "exec format error" 15 | GOOS=freebsd go test ./... | grep -v "exec format error" 16 | CGO_ENABLED=0 GOOS=darwin go test ./... | grep -v "exec format error" 17 | CGO_ENABLED=1 GOOS=darwin go test ./... | grep -v "exec format error" 18 | GOOS=windows go test ./...| grep -v "exec format error" 19 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/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 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 the given file descriptor is a terminal. 22 | func IsTerminal() bool { 23 | fd := syscall.Stdout 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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/utils/path.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Google Inc. All Rights Reserved. 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 utils 16 | 17 | import "os" 18 | 19 | func FileExists(file string) bool { 20 | if _, err := os.Stat(file); err != nil { 21 | return false 22 | } 23 | return true 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/godbus/dbus/transport_generic.go: -------------------------------------------------------------------------------- 1 | package dbus 2 | 3 | import ( 4 | "encoding/binary" 5 | "errors" 6 | "io" 7 | ) 8 | 9 | type genericTransport struct { 10 | io.ReadWriteCloser 11 | } 12 | 13 | func (t genericTransport) SendNullByte() error { 14 | _, err := t.Write([]byte{0}) 15 | return err 16 | } 17 | 18 | func (t genericTransport) SupportsUnixFDs() bool { 19 | return false 20 | } 21 | 22 | func (t genericTransport) EnableUnixFDs() {} 23 | 24 | func (t genericTransport) ReadMessage() (*Message, error) { 25 | return DecodeMessage(t) 26 | } 27 | 28 | func (t genericTransport) SendMessage(msg *Message) error { 29 | for _, v := range msg.Body { 30 | if _, ok := v.(UnixFD); ok { 31 | return errors.New("dbus: unix fd passing not enabled") 32 | } 33 | } 34 | return msg.EncodeTo(t, binary.LittleEndian) 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/utils/procfs/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Google Inc. All Rights Reserved. 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 | // procfs contains several low level functions to read information from /proc 16 | // filesystem, and also provides some utility functions like JiffiesToDuration. 17 | package procfs 18 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/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: fmt 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 -v github.com/vishvananda/netlink/$@ 22 | 23 | $(call fmt,$(call testdirs,$(DIRS))): 24 | ! gofmt -l $(subst fmt-,,$@)/*.go | grep '' 25 | 26 | .PHONY: fmt 27 | fmt: $(call fmt,$(call testdirs,$(DIRS))) 28 | 29 | test: fmt $(call goroot,$(DEPS)) $(call testdirs,$(DIRS)) 30 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/host/types_freebsd.go: -------------------------------------------------------------------------------- 1 | // +build ignore 2 | 3 | /* 4 | Input to cgo -godefs. 5 | */ 6 | 7 | package host 8 | 9 | /* 10 | #define KERNEL 11 | #include 12 | #include 13 | #include 14 | 15 | enum { 16 | sizeofPtr = sizeof(void*), 17 | }; 18 | 19 | */ 20 | import "C" 21 | 22 | // Machine characteristics; for internal use. 23 | 24 | const ( 25 | sizeofPtr = C.sizeofPtr 26 | sizeofShort = C.sizeof_short 27 | sizeofInt = C.sizeof_int 28 | sizeofLong = C.sizeof_long 29 | sizeofLongLong = C.sizeof_longlong 30 | sizeOfUtmpx = C.sizeof_struct_utmpx 31 | ) 32 | 33 | // Basic types 34 | 35 | type ( 36 | _C_short C.short 37 | _C_int C.int 38 | _C_long C.long 39 | _C_long_long C.longlong 40 | ) 41 | 42 | type Utmp C.struct_utmp 43 | type Utmpx C.struct_utmpx 44 | type Timeval C.struct_timeval 45 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Shopify/sarama/length_field.go: -------------------------------------------------------------------------------- 1 | package sarama 2 | 3 | import "encoding/binary" 4 | 5 | // LengthField implements the PushEncoder and PushDecoder interfaces for calculating 4-byte lengths. 6 | type lengthField struct { 7 | startOffset int 8 | } 9 | 10 | func (l *lengthField) saveOffset(in int) { 11 | l.startOffset = in 12 | } 13 | 14 | func (l *lengthField) reserveLength() int { 15 | return 4 16 | } 17 | 18 | func (l *lengthField) run(curOffset int, buf []byte) error { 19 | binary.BigEndian.PutUint32(buf[l.startOffset:], uint32(curOffset-l.startOffset-4)) 20 | return nil 21 | } 22 | 23 | func (l *lengthField) check(curOffset int, buf []byte) error { 24 | if uint32(curOffset-l.startOffset-4) != binary.BigEndian.Uint32(buf[l.startOffset:]) { 25 | return PacketDecodingError{"length field invalid"} 26 | } 27 | 28 | return nil 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/lstat_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package system 4 | 5 | import ( 6 | "os" 7 | ) 8 | 9 | // Some explanation for my own sanity, and hopefully maintainers in the 10 | // future. 11 | // 12 | // Lstat calls os.Lstat to get a fileinfo interface back. 13 | // This is then copied into our own locally defined structure. 14 | // Note the Linux version uses fromStatT to do the copy back, 15 | // but that not strictly necessary when already in an OS specific module. 16 | 17 | func Lstat(path string) (*Stat_t, error) { 18 | fi, err := os.Lstat(path) 19 | if err != nil { 20 | return nil, err 21 | } 22 | 23 | return &Stat_t{ 24 | name: fi.Name(), 25 | size: fi.Size(), 26 | mode: fi.Mode(), 27 | modTime: fi.ModTime(), 28 | isDir: fi.IsDir()}, nil 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/utimes_linux.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import ( 4 | "syscall" 5 | "unsafe" 6 | ) 7 | 8 | func LUtimesNano(path string, ts []syscall.Timespec) error { 9 | // These are not currently available in syscall 10 | AT_FDCWD := -100 11 | AT_SYMLINK_NOFOLLOW := 0x100 12 | 13 | var _path *byte 14 | _path, err := syscall.BytePtrFromString(path) 15 | if err != nil { 16 | return err 17 | } 18 | 19 | if _, _, err := syscall.Syscall6(syscall.SYS_UTIMENSAT, uintptr(AT_FDCWD), uintptr(unsafe.Pointer(_path)), uintptr(unsafe.Pointer(&ts[0])), uintptr(AT_SYMLINK_NOFOLLOW), 0, 0); err != 0 && err != syscall.ENOSYS { 20 | return err 21 | } 22 | 23 | return nil 24 | } 25 | 26 | func UtimesNano(path string, ts []syscall.Timespec) error { 27 | return syscall.UtimesNano(path, ts) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/godbus/dbus/homedir_static.go: -------------------------------------------------------------------------------- 1 | // +build static_build 2 | 3 | package dbus 4 | 5 | import ( 6 | "bufio" 7 | "os" 8 | "strconv" 9 | "strings" 10 | ) 11 | 12 | func lookupHomeDir() string { 13 | myUid := os.Getuid() 14 | 15 | f, err := os.Open("/etc/passwd") 16 | if err != nil { 17 | return "/" 18 | } 19 | defer f.Close() 20 | 21 | s := bufio.NewScanner(f) 22 | 23 | for s.Scan() { 24 | if err := s.Err(); err != nil { 25 | break 26 | } 27 | 28 | line := strings.TrimSpace(s.Text()) 29 | if line == "" { 30 | continue 31 | } 32 | 33 | parts := strings.Split(line, ":") 34 | 35 | if len(parts) >= 6 { 36 | uid, err := strconv.Atoi(parts[2]) 37 | if err == nil && uid == myUid { 38 | return parts[5] 39 | } 40 | } 41 | } 42 | 43 | // Default to / if we can't get a better value 44 | return "/" 45 | } 46 | -------------------------------------------------------------------------------- /vendor/github.com/shirou/gopsutil/host/host_freebsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs types_freebsd.go 3 | 4 | package host 5 | 6 | const ( 7 | sizeofPtr = 0x8 8 | sizeofShort = 0x2 9 | sizeofInt = 0x4 10 | sizeofLong = 0x8 11 | sizeofLongLong = 0x8 12 | sizeOfUtmpx = 197 // TODO: why should 197, not 0x118 13 | ) 14 | 15 | type ( 16 | _C_short int16 17 | _C_int int32 18 | _C_long int64 19 | _C_long_long int64 20 | ) 21 | 22 | type Utmp struct { 23 | Line [8]int8 24 | Name [16]int8 25 | Host [16]int8 26 | Time int32 27 | } 28 | 29 | type Utmpx struct { 30 | Type int16 31 | Tv Timeval 32 | Id [8]int8 33 | Pid int32 34 | User [32]int8 35 | Line [16]int8 36 | Host [125]int8 37 | // Host [128]int8 38 | // X__ut_spare [64]int8 39 | } 40 | 41 | type Timeval struct { 42 | Sec [4]byte 43 | Usec [3]byte 44 | } 45 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/docs/prometheus.md: -------------------------------------------------------------------------------- 1 | # Monitoring cAdvisor with Prometheus 2 | 3 | cAdvisor exposes container statistics as [Prometheus](http://prometheus.io) metrics out of the box. By default, these metrics are served under the `/metrics` HTTP endpoint. This endpoint may be customized by setting the `-prometheus_endpoint` command-line flag. 4 | 5 | To monitor cAdvisor with Prometheus, simply configure one or more jobs in Prometheus which scrape the relevant cAdvisor processes at that metrics endpoint. For details, see Prometheus's [Configuration](http://prometheus.io/docs/operating/configuration/) documentation, as well as the [Getting started](http://prometheus.io/docs/introduction/getting_started/) guide. 6 | 7 | # Examples 8 | [CenturyLink Labs](https://labs.ctl.io/) did an excellent write up on [Monitoring Docker services with Prometheus +cAdvisor](https://labs.ctl.io/monitoring-docker-services-with-prometheus/) 9 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/utils/cpuload/netlink/defs.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 Google Inc. All Rights Reserved. 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 netlink 16 | 17 | /* 18 | #include 19 | */ 20 | import "C" 21 | 22 | type TaskStats C.struct_taskstats 23 | 24 | const ( 25 | __TASKSTATS_CMD_MAX = C.__TASKSTATS_CMD_MAX 26 | ) 27 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/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 speficied 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 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Shopify/sarama/mocks/README.md: -------------------------------------------------------------------------------- 1 | # sarama/mocks 2 | 3 | The `mocks` subpackage includes mock implementations that implement the interfaces of the major sarama types. 4 | You can use them to test your sarama applications using dependency injection. 5 | 6 | The following mock objects are available: 7 | 8 | - [Consumer](https://godoc.org/github.com/Shopify/sarama/mocks#Consumer), which will create [PartitionConsumer](https://godoc.org/github.com/Shopify/sarama/mocks#PartitionConsumer) mocks. 9 | - [AsyncProducer](https://godoc.org/github.com/Shopify/sarama/mocks#AsyncProducer) 10 | - [SyncProducer](https://godoc.org/github.com/Shopify/sarama/mocks#SyncProducer) 11 | 12 | The mocks allow you to set expectations on them. When you close the mocks, the expectations will be verified, 13 | and the results will be reported to the `*testing.T` object you provided when creating the mock. 14 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/longpath/longpath.go: -------------------------------------------------------------------------------- 1 | // longpath introduces some constants and helper functions for handling long paths 2 | // in Windows, which are expected to be prepended with `\\?\` and followed by either 3 | // a drive letter, a UNC server\share, or a volume identifier. 4 | 5 | package longpath 6 | 7 | import ( 8 | "strings" 9 | ) 10 | 11 | // Prefix is the longpath prefix for Windows file paths. 12 | const Prefix = `\\?\` 13 | 14 | // AddPrefix will add the Windows long path prefix to the path provided if 15 | // it does not already have it. 16 | func AddPrefix(path string) string { 17 | if !strings.HasPrefix(path, Prefix) { 18 | if strings.HasPrefix(path, `\\`) { 19 | // This is a UNC path, so we need to add 'UNC' to the path as well. 20 | path = Prefix + `UNC` + path[1:] 21 | } else { 22 | path = Prefix + path 23 | } 24 | } 25 | return path 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/influxdb/influxdb/pkg/escape/bytes.go: -------------------------------------------------------------------------------- 1 | package escape 2 | 3 | import "bytes" 4 | 5 | func Bytes(in []byte) []byte { 6 | for b, esc := range Codes { 7 | in = bytes.Replace(in, []byte{b}, esc, -1) 8 | } 9 | return in 10 | } 11 | 12 | func Unescape(in []byte) []byte { 13 | i := 0 14 | inLen := len(in) 15 | var out []byte 16 | 17 | for { 18 | if i >= inLen { 19 | break 20 | } 21 | if in[i] == '\\' && i+1 < inLen { 22 | switch in[i+1] { 23 | case ',': 24 | out = append(out, ',') 25 | i += 2 26 | continue 27 | case '"': 28 | out = append(out, '"') 29 | i += 2 30 | continue 31 | case ' ': 32 | out = append(out, ' ') 33 | i += 2 34 | continue 35 | case '=': 36 | out = append(out, '=') 37 | i += 2 38 | continue 39 | } 40 | } 41 | out = append(out, in[i]) 42 | i += 1 43 | } 44 | return out 45 | } 46 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/configs/namespaces_syscall.go: -------------------------------------------------------------------------------- 1 | // +build linux 2 | 3 | package configs 4 | 5 | import "syscall" 6 | 7 | func (n *Namespace) Syscall() int { 8 | return namespaceInfo[n.Type] 9 | } 10 | 11 | var namespaceInfo = map[NamespaceType]int{ 12 | NEWNET: syscall.CLONE_NEWNET, 13 | NEWNS: syscall.CLONE_NEWNS, 14 | NEWUSER: syscall.CLONE_NEWUSER, 15 | NEWIPC: syscall.CLONE_NEWIPC, 16 | NEWUTS: syscall.CLONE_NEWUTS, 17 | NEWPID: syscall.CLONE_NEWPID, 18 | } 19 | 20 | // CloneFlags parses the container's Namespaces options to set the correct 21 | // flags on clone, unshare. This functions returns flags only for new namespaces. 22 | func (n *Namespaces) CloneFlags() uintptr { 23 | var flag int 24 | for _, v := range *n { 25 | if v.Path != "" { 26 | continue 27 | } 28 | flag |= namespaceInfo[v.Type] 29 | } 30 | return uintptr(flag) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/google/cadvisor/Godeps/_workspace/src/github.com/jmespath/go-jmespath/astnodetype_string.go: -------------------------------------------------------------------------------- 1 | // generated by stringer -type astNodeType; DO NOT EDIT 2 | 3 | package jmespath 4 | 5 | import "fmt" 6 | 7 | const _astNodeType_name = "ASTEmptyASTComparatorASTCurrentNodeASTExpRefASTFunctionExpressionASTFieldASTFilterProjectionASTFlattenASTIdentityASTIndexASTIndexExpressionASTKeyValPairASTLiteralASTMultiSelectHashASTMultiSelectListASTOrExpressionASTAndExpressionASTNotExpressionASTPipeASTProjectionASTSubexpressionASTSliceASTValueProjection" 8 | 9 | var _astNodeType_index = [...]uint16{0, 8, 21, 35, 44, 65, 73, 92, 102, 113, 121, 139, 152, 162, 180, 198, 213, 229, 245, 252, 265, 281, 289, 307} 10 | 11 | func (i astNodeType) String() string { 12 | if i < 0 || i >= astNodeType(len(_astNodeType_index)-1) { 13 | return fmt.Sprintf("astNodeType(%d)", i) 14 | } 15 | return _astNodeType_name[_astNodeType_index[i]:_astNodeType_index[i+1]] 16 | } 17 | --------------------------------------------------------------------------------