├── Version ├── ltc ├── Godeps │ ├── _workspace │ │ ├── .gitignore │ │ └── src │ │ │ └── github.com │ │ │ ├── tedsuo │ │ │ └── rata │ │ │ │ ├── VERSION │ │ │ │ └── router_suite_test.go │ │ │ ├── Sirupsen │ │ │ └── logrus │ │ │ │ ├── .gitignore │ │ │ │ ├── .travis.yml │ │ │ │ ├── terminal_openbsd.go │ │ │ │ ├── terminal_linux.go │ │ │ │ ├── terminal_darwin.go │ │ │ │ ├── terminal_freebsd.go │ │ │ │ ├── hooks │ │ │ │ ├── syslog │ │ │ │ │ ├── README.md │ │ │ │ │ └── syslog_test.go │ │ │ │ └── papertrail │ │ │ │ │ └── papertrail_test.go │ │ │ │ ├── terminal_notwindows.go │ │ │ │ ├── json_formatter.go │ │ │ │ ├── writer.go │ │ │ │ ├── terminal_windows.go │ │ │ │ ├── text_formatter_test.go │ │ │ │ └── examples │ │ │ │ └── basic │ │ │ │ └── basic.go │ │ │ ├── cloudfoundry-incubator │ │ │ ├── cf_http │ │ │ │ ├── .gitignore │ │ │ │ ├── README.md │ │ │ │ ├── cf_http_suite_test.go │ │ │ │ └── cf_http.go │ │ │ ├── receptor │ │ │ │ ├── .gitignore │ │ │ │ ├── README.md │ │ │ │ ├── fake_receptor │ │ │ │ │ ├── fake_client_test.go │ │ │ │ │ └── fake_receptor_suite_test.go │ │ │ │ ├── event │ │ │ │ │ └── event_suite_test.go │ │ │ │ ├── receptor_suite_test.go │ │ │ │ ├── watcher │ │ │ │ │ └── watcher_suite_test.go │ │ │ │ ├── task_handler │ │ │ │ │ ├── task_handler_suite_test.go │ │ │ │ │ └── handlers.go │ │ │ │ ├── serialization │ │ │ │ │ ├── serialization_suite_test.go │ │ │ │ │ └── cells.go │ │ │ │ ├── doc │ │ │ │ │ ├── api_cells.md │ │ │ │ │ ├── README.md │ │ │ │ │ ├── api_domains.md │ │ │ │ │ └── auth.md │ │ │ │ ├── cmd │ │ │ │ │ └── receptor │ │ │ │ │ │ └── start_test.go │ │ │ │ ├── errors.go │ │ │ │ └── handlers │ │ │ │ │ └── handlers_suite_test.go │ │ │ └── runtime-schema │ │ │ │ └── models │ │ │ │ ├── port_mapping.go │ │ │ │ ├── cc_upload_staging_uri_key.go │ │ │ │ ├── rootfs.go │ │ │ │ ├── rootfs_test.go │ │ │ │ ├── taskstate_string.go │ │ │ │ ├── lrp_start_request.go │ │ │ │ ├── models_suite_test.go │ │ │ │ └── auctioneer_presence.go │ │ │ ├── onsi │ │ │ ├── gomega │ │ │ │ ├── .gitignore │ │ │ │ ├── matchers │ │ │ │ │ ├── support │ │ │ │ │ │ └── goraph │ │ │ │ │ │ │ ├── node │ │ │ │ │ │ │ └── node.go │ │ │ │ │ │ │ └── util │ │ │ │ │ │ │ └── util.go │ │ │ │ │ ├── matcher_tests_suite_test.go │ │ │ │ │ ├── be_true_matcher_test.go │ │ │ │ │ ├── be_false_matcher_test.go │ │ │ │ │ ├── be_nil_matcher.go │ │ │ │ │ ├── be_nil_matcher_test.go │ │ │ │ │ ├── be_true_matcher.go │ │ │ │ │ ├── be_false_matcher.go │ │ │ │ │ ├── be_zero_matcher.go │ │ │ │ │ ├── be_empty_matcher.go │ │ │ │ │ ├── be_zero_matcher_test.go │ │ │ │ │ ├── have_occurred_matcher_test.go │ │ │ │ │ ├── equal_matcher.go │ │ │ │ │ ├── succeed_matcher.go │ │ │ │ │ ├── succeed_matcher_test.go │ │ │ │ │ └── have_len_matcher.go │ │ │ │ ├── internal │ │ │ │ │ ├── testingtsupport │ │ │ │ │ │ └── testing_t_support_test.go │ │ │ │ │ ├── assertion │ │ │ │ │ │ └── assertion_suite_test.go │ │ │ │ │ ├── asyncassertion │ │ │ │ │ │ └── async_assertion_suite_test.go │ │ │ │ │ └── fakematcher │ │ │ │ │ │ └── fake_matcher.go │ │ │ │ ├── format │ │ │ │ │ └── format_suite_test.go │ │ │ │ ├── gbytes │ │ │ │ │ └── gbuffer_suite_test.go │ │ │ │ ├── ghttp │ │ │ │ │ └── test_server_suite_test.go │ │ │ │ ├── .travis.yml │ │ │ │ ├── gexec │ │ │ │ │ └── gexec_suite_test.go │ │ │ │ ├── types │ │ │ │ │ └── types.go │ │ │ │ └── README.md │ │ │ └── ginkgo │ │ │ │ ├── integration │ │ │ │ ├── integration.go │ │ │ │ └── tags_test.go │ │ │ │ ├── .gitignore │ │ │ │ ├── ginkgo │ │ │ │ ├── interrupthandler │ │ │ │ │ ├── sigquit_swallower_windows.go │ │ │ │ │ └── sigquit_swallower_unix.go │ │ │ │ ├── testsuite │ │ │ │ │ └── testsuite_suite_test.go │ │ │ │ ├── version_command.go │ │ │ │ ├── watch │ │ │ │ │ └── delta.go │ │ │ │ ├── testrunner │ │ │ │ │ └── run_result.go │ │ │ │ ├── help_command.go │ │ │ │ └── unfocus_command.go │ │ │ │ ├── types │ │ │ │ ├── types_suite_test.go │ │ │ │ ├── code_location.go │ │ │ │ └── synchronization.go │ │ │ │ ├── internal │ │ │ │ ├── spec │ │ │ │ │ └── spec_suite_test.go │ │ │ │ ├── failer │ │ │ │ │ └── failer_suite_test.go │ │ │ │ ├── writer │ │ │ │ │ ├── writer_suite_test.go │ │ │ │ │ └── fake_writer.go │ │ │ │ ├── leafnodes │ │ │ │ │ ├── leaf_node_suite_test.go │ │ │ │ │ ├── interfaces.go │ │ │ │ │ └── it_node_test.go │ │ │ │ ├── remote │ │ │ │ │ ├── remote_suite_test.go │ │ │ │ │ ├── output_interceptor.go │ │ │ │ │ ├── fake_output_interceptor_test.go │ │ │ │ │ ├── fake_poster_test.go │ │ │ │ │ └── output_interceptor_win.go │ │ │ │ ├── specrunner │ │ │ │ │ ├── spec_runner_suite_test.go │ │ │ │ │ └── random_id.go │ │ │ │ ├── codelocation │ │ │ │ │ └── code_location_suite_test.go │ │ │ │ ├── containernode │ │ │ │ │ └── container_node_suite_test.go │ │ │ │ └── suite │ │ │ │ │ └── suite_suite_test.go │ │ │ │ ├── reporters │ │ │ │ ├── reporters_suite_test.go │ │ │ │ └── reporter.go │ │ │ │ └── .travis.yml │ │ │ ├── bmizerany │ │ │ └── pat │ │ │ │ ├── .gitignore │ │ │ │ ├── bench_test.go │ │ │ │ └── example │ │ │ │ └── hello.go │ │ │ ├── docker │ │ │ ├── docker │ │ │ │ ├── engine │ │ │ │ │ ├── MAINTAINERS │ │ │ │ │ ├── helpers_test.go │ │ │ │ │ └── hack.go │ │ │ │ ├── pkg │ │ │ │ │ ├── mflag │ │ │ │ │ │ └── MAINTAINERS │ │ │ │ │ ├── term │ │ │ │ │ │ ├── MAINTAINERS │ │ │ │ │ │ └── tc_other.go │ │ │ │ │ ├── parsers │ │ │ │ │ │ ├── MAINTAINERS │ │ │ │ │ │ └── kernel │ │ │ │ │ │ │ ├── uname_unsupported.go │ │ │ │ │ │ │ └── uname_linux.go │ │ │ │ │ ├── httputils │ │ │ │ │ │ └── MAINTAINERS │ │ │ │ │ ├── timeutils │ │ │ │ │ │ ├── MAINTAINERS │ │ │ │ │ │ └── json.go │ │ │ │ │ ├── archive │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── MAINTAINERS │ │ │ │ │ │ ├── testdata │ │ │ │ │ │ │ └── broken.tar │ │ │ │ │ │ ├── time_unsupported.go │ │ │ │ │ │ ├── time_linux.go │ │ │ │ │ │ └── archive_windows.go │ │ │ │ │ ├── units │ │ │ │ │ │ └── MAINTAINERS │ │ │ │ │ ├── system │ │ │ │ │ │ ├── MAINTAINERS │ │ │ │ │ │ ├── meminfo_unsupported.go │ │ │ │ │ │ ├── errors.go │ │ │ │ │ │ ├── lstat_windows.go │ │ │ │ │ │ ├── umask.go │ │ │ │ │ │ ├── umask_windows.go │ │ │ │ │ │ ├── stat_linux.go │ │ │ │ │ │ ├── stat_windows.go │ │ │ │ │ │ ├── utimes_darwin.go │ │ │ │ │ │ ├── lstat.go │ │ │ │ │ │ ├── xattrs_unsupported.go │ │ │ │ │ │ ├── utimes_unsupported.go │ │ │ │ │ │ ├── stat_unsupported.go │ │ │ │ │ │ ├── mknod_windows.go │ │ │ │ │ │ ├── meminfo.go │ │ │ │ │ │ ├── mknod.go │ │ │ │ │ │ ├── lstat_test.go │ │ │ │ │ │ ├── utimes_freebsd.go │ │ │ │ │ │ ├── stat.go │ │ │ │ │ │ ├── stat_test.go │ │ │ │ │ │ └── utimes_linux.go │ │ │ │ │ ├── tarsum │ │ │ │ │ │ ├── testdata │ │ │ │ │ │ │ ├── xattr │ │ │ │ │ │ │ │ └── layer.tar │ │ │ │ │ │ │ └── 511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158 │ │ │ │ │ │ │ │ └── json │ │ │ │ │ │ ├── MAINTAINERS │ │ │ │ │ │ ├── writercloser.go │ │ │ │ │ │ └── builder_context.go │ │ │ │ │ ├── promise │ │ │ │ │ │ └── promise.go │ │ │ │ │ ├── fileutils │ │ │ │ │ │ └── fileutils.go │ │ │ │ │ ├── ioutils │ │ │ │ │ │ ├── writers.go │ │ │ │ │ │ └── readers_test.go │ │ │ │ │ └── version │ │ │ │ │ │ └── version_test.go │ │ │ │ ├── vendor │ │ │ │ │ └── src │ │ │ │ │ │ └── code.google.com │ │ │ │ │ │ └── p │ │ │ │ │ │ └── go │ │ │ │ │ │ └── src │ │ │ │ │ │ └── pkg │ │ │ │ │ │ └── archive │ │ │ │ │ │ └── tar │ │ │ │ │ │ ├── testdata │ │ │ │ │ │ ├── small.txt │ │ │ │ │ │ ├── small2.txt │ │ │ │ │ │ ├── v7.tar │ │ │ │ │ │ ├── writer-big.tar │ │ │ │ │ │ └── writer-big-long.tar │ │ │ │ │ │ ├── stat_atim.go │ │ │ │ │ │ ├── stat_atimespec.go │ │ │ │ │ │ └── stat_unix.go │ │ │ │ ├── daemon │ │ │ │ │ └── graphdriver │ │ │ │ │ │ ├── btrfs │ │ │ │ │ │ ├── MAINTAINERS │ │ │ │ │ │ ├── dummy_unsupported.go │ │ │ │ │ │ ├── version_test.go │ │ │ │ │ │ ├── version_none.go │ │ │ │ │ │ ├── version.go │ │ │ │ │ │ └── btrfs_test.go │ │ │ │ │ │ ├── devmapper │ │ │ │ │ │ └── MAINTAINERS │ │ │ │ │ │ ├── driver_unsupported.go │ │ │ │ │ │ ├── aufs │ │ │ │ │ │ ├── mount_linux.go │ │ │ │ │ │ ├── mount_unsupported.go │ │ │ │ │ │ └── mount.go │ │ │ │ │ │ ├── driver_linux.go │ │ │ │ │ │ ├── overlay │ │ │ │ │ │ └── overlay_test.go │ │ │ │ │ │ └── vfs │ │ │ │ │ │ └── vfs_test.go │ │ │ │ ├── api │ │ │ │ │ ├── MAINTAINERS │ │ │ │ │ ├── server │ │ │ │ │ │ └── MAINTAINERS │ │ │ │ │ ├── README.md │ │ │ │ │ └── api_unit_test.go │ │ │ │ ├── registry │ │ │ │ │ ├── MAINTAINERS │ │ │ │ │ └── v2 │ │ │ │ │ │ └── doc.go │ │ │ │ ├── image │ │ │ │ │ └── graph.go │ │ │ │ ├── utils │ │ │ │ │ ├── random.go │ │ │ │ │ ├── tmpdir.go │ │ │ │ │ ├── timeoutconn.go │ │ │ │ │ └── daemon.go │ │ │ │ ├── opts │ │ │ │ │ └── ip.go │ │ │ │ ├── nat │ │ │ │ │ ├── sort.go │ │ │ │ │ └── sort_test.go │ │ │ │ └── dockerversion │ │ │ │ │ └── dockerversion.go │ │ │ └── libtrust │ │ │ │ ├── MAINTAINERS │ │ │ │ ├── doc.go │ │ │ │ ├── CONTRIBUTING.md │ │ │ │ ├── util_test.go │ │ │ │ └── README.md │ │ │ ├── cloudfoundry │ │ │ └── noaa │ │ │ │ ├── .gitignore │ │ │ │ ├── events │ │ │ │ ├── event.go │ │ │ │ └── generate-events.sh │ │ │ │ ├── errors │ │ │ │ ├── error_codes.go │ │ │ │ └── unauthorized_error.go │ │ │ │ ├── debug_printer.go │ │ │ │ ├── noaa_suite_test.go │ │ │ │ ├── container_metrics_sample │ │ │ │ └── container_metrics_emitter.go │ │ │ │ ├── sort_container_metrics.go │ │ │ │ └── sort_recent.go │ │ │ ├── gizak │ │ │ └── termui │ │ │ │ ├── .travis.yml │ │ │ │ ├── example │ │ │ │ ├── par.png │ │ │ │ ├── gauge.png │ │ │ │ ├── grid.gif │ │ │ │ ├── list.png │ │ │ │ ├── barchart.png │ │ │ │ ├── dashboard.gif │ │ │ │ ├── linechart.png │ │ │ │ ├── sparklines.png │ │ │ │ ├── themedefault.png │ │ │ │ ├── themehelloworld.png │ │ │ │ └── list.go │ │ │ │ ├── chart_others.go │ │ │ │ ├── chart_windows.go │ │ │ │ ├── .gitignore │ │ │ │ ├── box_others.go │ │ │ │ ├── box_windows.go │ │ │ │ ├── point.go │ │ │ │ └── doc.go │ │ │ ├── gorilla │ │ │ ├── websocket │ │ │ │ ├── .travis.yml │ │ │ │ ├── AUTHORS │ │ │ │ ├── .gitignore │ │ │ │ ├── examples │ │ │ │ │ ├── autobahn │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ └── fuzzingclient.json │ │ │ │ │ ├── filewatch │ │ │ │ │ │ └── README.md │ │ │ │ │ └── chat │ │ │ │ │ │ └── README.md │ │ │ │ └── bench_test.go │ │ │ ├── mux │ │ │ │ ├── .travis.yml │ │ │ │ ├── README.md │ │ │ │ └── bench_test.go │ │ │ └── context │ │ │ │ ├── .travis.yml │ │ │ │ └── README.md │ │ │ ├── codegangsta │ │ │ └── cli │ │ │ │ ├── .travis.yml │ │ │ │ ├── autocomplete │ │ │ │ ├── zsh_autocomplete │ │ │ │ └── bash_autocomplete │ │ │ │ ├── helpers_test.go │ │ │ │ └── cli.go │ │ │ ├── pivotal-golang │ │ │ ├── clock │ │ │ │ ├── README.md │ │ │ │ ├── fakeclock │ │ │ │ │ └── fakeclock_suite_test.go │ │ │ │ ├── ticker.go │ │ │ │ ├── timer.go │ │ │ │ └── clock.go │ │ │ ├── lager │ │ │ │ ├── chug │ │ │ │ │ └── chug_suite_test.go │ │ │ │ ├── lager_suite_test.go │ │ │ │ ├── ginkgoreporter │ │ │ │ │ └── ginkgoreporter_suite_test.go │ │ │ │ ├── models.go │ │ │ │ └── reconfigurable_sink.go │ │ │ └── bytefmt │ │ │ │ ├── formatters_suite_test.go │ │ │ │ └── README.md │ │ │ ├── vito │ │ │ └── go-sse │ │ │ │ └── sse │ │ │ │ ├── errors.go │ │ │ │ └── sse_suite_test.go │ │ │ ├── nsf │ │ │ └── termbox-go │ │ │ │ ├── AUTHORS │ │ │ │ ├── syscalls_freebsd.go │ │ │ │ ├── syscalls_netbsd.go │ │ │ │ ├── syscalls_openbsd.go │ │ │ │ ├── syscalls_darwin_386.go │ │ │ │ └── syscalls.go │ │ │ ├── nu7hatch │ │ │ └── gouuid │ │ │ │ ├── .gitignore │ │ │ │ ├── README.md │ │ │ │ └── example_test.go │ │ │ └── mattn │ │ │ └── go-runewidth │ │ │ ├── runewidth_js.go │ │ │ ├── .travis.yml │ │ │ ├── runewidth_windows.go │ │ │ └── README.mkd │ └── Readme ├── logs │ ├── reserved_app_ids │ │ └── reserved_app_ids.go │ ├── logs_suite_test.go │ ├── console_tailed_logs_outputter │ │ ├── chug │ │ │ └── chug_suite_test.go │ │ ├── prettify │ │ │ └── prettify_suite_test.go │ │ └── console_tailed_logs_outputter_suite_test.go │ └── command_factory │ │ └── command_factory_suite_test.go ├── config │ ├── persister │ │ ├── persister.go │ │ ├── persister_suite_test.go │ │ ├── mem_persister.go │ │ └── file_persister.go │ ├── config_suite_test.go │ ├── config_helpers │ │ ├── config_helpers.go │ │ ├── config_helpers_suite_test.go │ │ └── config_helpers_test.go │ ├── target_verifier │ │ ├── receptor_client_factory │ │ │ └── receptor_client_factory.go │ │ └── target_verifier_suite_test.go │ └── command_factory │ │ └── command_factory_suite_test.go ├── exit_handler │ ├── exit_codes │ │ └── exit_codes.go │ ├── exit_handler_suite_test.go │ └── fake_exit_handler │ │ └── fake_exit_handler.go ├── main.go ├── main_suite_test.go ├── terminal │ ├── colors │ │ └── colors_suite_test.go │ ├── cursor │ │ ├── cursor_suite_test.go │ │ └── cursor.go │ ├── terminal_suite_test.go │ └── password_reader │ │ └── password_reader.go ├── app_examiner │ ├── app_examiner_suite_test.go │ ├── command_factory │ │ ├── presentation │ │ │ └── presentation_suite_test.go │ │ └── command_factory_suite_test.go │ └── noaa_consumer.go ├── test_helpers │ ├── matchers │ │ ├── matchers_suite_test.go │ │ └── be_exactly_nil_matcher.go │ ├── test_helpers_suite_test.go │ └── regex_safe_say.go ├── route_helpers │ └── route_helpers_suite_test.go ├── cli_app_factory │ └── cli_app_factory_suite_test.go ├── app_runner │ ├── docker_app_runner │ │ ├── docker_app_runner_suite_test.go │ │ ├── existing_app_error.go │ │ └── app_not_started_error.go │ ├── command_factory │ │ └── command_factory_suite_test.go │ ├── docker_metadata_fetcher │ │ └── docker_metadata_fetcher_suite_test.go │ └── docker_repository_name_formatter │ │ └── docker_repository_name_formatter_suite_test.go ├── integration_test │ └── command_factory │ │ └── command_factory_suite_test.go ├── scripts │ ├── test │ └── install └── main_test.go ├── DIEGO_VERSION ├── docs └── logos │ └── lattice.png ├── terraform ├── scripts │ └── remote │ │ ├── install-brain │ │ └── install-cell ├── digitalocean │ ├── provider.tf │ └── outputs.tf ├── aws │ ├── provider.tf │ └── outputs.tf └── google │ ├── provider.tf │ └── outputs.tf ├── cluster ├── brain │ ├── config │ │ ├── consul.json │ │ ├── consul-services │ │ │ ├── etcd.json │ │ │ ├── nats.json │ │ │ └── file-server.json │ │ ├── gnatsd.conf │ │ ├── metron.json │ │ ├── doppler.json │ │ └── gorouter.yml │ ├── brain_health_check │ ├── upstart │ │ ├── bootstrap.conf │ │ ├── etcd.conf │ │ ├── gnatsd.conf │ │ ├── gorouter.conf │ │ ├── metron.conf │ │ ├── doppler.conf │ │ ├── file-server.conf │ │ ├── consul.conf │ │ ├── trafficcontroller.conf │ │ ├── route-emitter.conf │ │ └── receptor.conf │ └── setup │ │ └── trafficcontroller-template.json ├── cell │ ├── config │ │ ├── consul.json │ │ └── metron.json │ ├── cell_health_check │ └── upstart │ │ ├── bootstrap.conf │ │ ├── metron.conf │ │ ├── converger.conf │ │ ├── auctioneer.conf │ │ ├── consul.conf │ │ ├── rep.conf │ │ └── executor.conf ├── common │ └── system-config │ │ └── lattice.logrotate.txt └── scripts │ ├── install-common │ └── install-brain ├── tee2metron ├── tee2metron_suite_test.go └── test_helpers │ └── chatty_process │ └── main.go ├── pipeline ├── 01_compilation │ ├── compile_ltc │ └── compile_lattice_tar └── 02_test │ └── helpers │ └── setup_whetstone ├── images └── lattice-pipeline │ └── publish └── .gitignore /Version: -------------------------------------------------------------------------------- 1 | v0.2.3-87-g4de7314 2 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/.gitignore: -------------------------------------------------------------------------------- 1 | /pkg 2 | /bin 3 | -------------------------------------------------------------------------------- /DIEGO_VERSION: -------------------------------------------------------------------------------- 1 | 6bc903e698289f7f648c794bedd166e84dcab84c 2 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/tedsuo/rata/VERSION: -------------------------------------------------------------------------------- 1 | 0.3.0 2 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/Sirupsen/logrus/.gitignore: -------------------------------------------------------------------------------- 1 | logrus 2 | -------------------------------------------------------------------------------- /docs/logos/lattice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b/lattice/master/docs/logos/lattice.png -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/cloudfoundry-incubator/cf_http/.gitignore: -------------------------------------------------------------------------------- 1 | *.test 2 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/gomega/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.test 3 | . 4 | -------------------------------------------------------------------------------- /terraform/scripts/remote/install-brain: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | sudo /tmp/install-from-tar brain -------------------------------------------------------------------------------- /cluster/brain/config/consul.json: -------------------------------------------------------------------------------- 1 | { 2 | "ports": { 3 | "dns": 53 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /cluster/cell/config/consul.json: -------------------------------------------------------------------------------- 1 | { 2 | "ports": { 3 | "dns": 53 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /terraform/scripts/remote/install-cell: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | sudo /tmp/install-from-tar cell 4 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/bmizerany/pat/.gitignore: -------------------------------------------------------------------------------- 1 | *.prof 2 | *.out 3 | example/example 4 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/ginkgo/integration/integration.go: -------------------------------------------------------------------------------- 1 | package integration 2 | -------------------------------------------------------------------------------- /terraform/digitalocean/provider.tf: -------------------------------------------------------------------------------- 1 | provider "digitalocean" { 2 | token = "${var.do_token}" 3 | } 4 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/cloudfoundry-incubator/receptor/.gitignore: -------------------------------------------------------------------------------- 1 | *.coverprofile 2 | *.test 3 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/ginkgo/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | TODO 3 | tmp/**/* 4 | *.coverprofile -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/engine/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Solomon Hykes (@shykes) 2 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/pkg/mflag/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Victor Vieux (@vieux) 2 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/cloudfoundry/noaa/.gitignore: -------------------------------------------------------------------------------- 1 | *.coverprofile 2 | src/ 3 | bin/ 4 | pkg/ 5 | .idea 6 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/pkg/term/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Solomon Hykes (@shykes) 2 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/pkg/parsers/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Erik Hollensbe (@erikh) 2 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar/testdata/small.txt: -------------------------------------------------------------------------------- 1 | Kilts -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/gizak/termui/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - tip 5 | 6 | script: go test -v ./ -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/gorilla/websocket/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.1 5 | - 1.2 6 | - tip 7 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/cloudfoundry-incubator/cf_http/README.md: -------------------------------------------------------------------------------- 1 | # cf_http 2 | 3 | Wrapper for official go http package 4 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar/testdata/small2.txt: -------------------------------------------------------------------------------- 1 | Google.com 2 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/gorilla/mux/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.0 5 | - 1.1 6 | - 1.2 7 | - tip 8 | -------------------------------------------------------------------------------- /ltc/logs/reserved_app_ids/reserved_app_ids.go: -------------------------------------------------------------------------------- 1 | package reserved_app_ids 2 | 3 | const LatticeDebugLogStreamAppId = "lattice-debug" 4 | -------------------------------------------------------------------------------- /cluster/brain/config/consul-services/etcd.json: -------------------------------------------------------------------------------- 1 | { 2 | "service": { 3 | "name": "etcd", 4 | "port": 4001 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /cluster/brain/config/consul-services/nats.json: -------------------------------------------------------------------------------- 1 | { 2 | "service": { 3 | "name": "nats", 4 | "port": 4222 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/daemon/graphdriver/btrfs/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Alexander Larsson (@alexlarsson) 2 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/pkg/httputils/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Cristian Staretu (@unclejack) 2 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/pkg/timeutils/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Cristian Staretu (@unclejack) 2 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/cloudfoundry/noaa/events/event.go: -------------------------------------------------------------------------------- 1 | package events 2 | 3 | type Event interface { 4 | ProtoMessage() 5 | } 6 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/daemon/graphdriver/btrfs/dummy_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux !cgo 2 | 3 | package btrfs 4 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/pkg/archive/README.md: -------------------------------------------------------------------------------- 1 | This code provides helper functions for dealing with archive files. 2 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/cloudfoundry-incubator/receptor/README.md: -------------------------------------------------------------------------------- 1 | # Receptor 2 | 3 | Restful API for Diego, which lives on every cell. 4 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/codegangsta/cli/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 1.1 3 | 4 | script: 5 | - go vet ./... 6 | - go test -v ./... 7 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/pivotal-golang/clock/README.md: -------------------------------------------------------------------------------- 1 | Provides a `Clock` interface, useful for injecting time dependencies in tests. 2 | -------------------------------------------------------------------------------- /cluster/brain/config/consul-services/file-server.json: -------------------------------------------------------------------------------- 1 | { 2 | "service": { 3 | "name": "file_server", 4 | "port": 8080 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /cluster/cell/cell_health_check: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | /var/lattice/health_check "auctioneer" "consul" "converger" "executor" "garden-linux" "metron" "rep" 4 | -------------------------------------------------------------------------------- /ltc/config/persister/persister.go: -------------------------------------------------------------------------------- 1 | package persister 2 | 3 | type Persister interface { 4 | Load(interface{}) error 5 | Save(interface{}) error 6 | } 7 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/api/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Victor Vieux (@vieux) 2 | Jessie Frazelle (@jfrazelle) 3 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/vito/go-sse/sse/errors.go: -------------------------------------------------------------------------------- 1 | package sse 2 | 3 | import "errors" 4 | 5 | var ErrSourceClosed = errors.New("source closed") 6 | -------------------------------------------------------------------------------- /ltc/exit_handler/exit_codes/exit_codes.go: -------------------------------------------------------------------------------- 1 | package exit_codes 2 | 3 | const ( 4 | BadTarget = 12 5 | PlacementError = 22 6 | SigInt = 130 7 | ) 8 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/pkg/units/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Victor Vieux (@vieux) 2 | Jessie Frazelle (@jfrazelle) 3 | -------------------------------------------------------------------------------- /ltc/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 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/cloudfoundry/noaa/errors/error_codes.go: -------------------------------------------------------------------------------- 1 | package errors 2 | 3 | const ERR_LOST_CONNECTION = int32(1) 4 | const ERR_DIAL = int32(2) 5 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/api/server/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Victor Vieux (@vieux) 2 | # Johan Euphrosine (@proppy) 3 | -------------------------------------------------------------------------------- /ltc/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 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/gizak/termui/example/par.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b/lattice/master/ltc/Godeps/_workspace/src/github.com/gizak/termui/example/par.png -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/gorilla/context/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.0 5 | - 1.1 6 | - 1.2 7 | - 1.3 8 | - 1.4 9 | - tip 10 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/nsf/termbox-go/AUTHORS: -------------------------------------------------------------------------------- 1 | # Please keep this file sorted. 2 | 3 | Georg Reinke 4 | nsf 5 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/pkg/system/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Michael Crosby (@crosbymichael) 2 | Victor Vieux (@vieux) 3 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/gizak/termui/example/gauge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b/lattice/master/ltc/Godeps/_workspace/src/github.com/gizak/termui/example/gauge.png -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/gizak/termui/example/grid.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b/lattice/master/ltc/Godeps/_workspace/src/github.com/gizak/termui/example/grid.gif -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/gizak/termui/example/list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b/lattice/master/ltc/Godeps/_workspace/src/github.com/gizak/termui/example/list.png -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/nu7hatch/gouuid/.gitignore: -------------------------------------------------------------------------------- 1 | _obj 2 | _test 3 | *.6 4 | *.out 5 | _testmain.go 6 | \#* 7 | .\#* 8 | *.log 9 | _cgo* 10 | *.o 11 | *.a 12 | -------------------------------------------------------------------------------- /terraform/aws/provider.tf: -------------------------------------------------------------------------------- 1 | provider "aws" { 2 | access_key = "${var.aws_access_key}" 3 | secret_key = "${var.aws_secret_key}" 4 | region = "${var.aws_region}" 5 | } 6 | -------------------------------------------------------------------------------- /terraform/google/provider.tf: -------------------------------------------------------------------------------- 1 | provider "google" { 2 | account_file = "${var.gce_account_file}" 3 | project = "${var.gce_project}" 4 | region = "${var.gce_region}" 5 | } 6 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/pkg/archive/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Cristian Staretu (@unclejack) 2 | Tibor Vass (@tiborvass) 3 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/gizak/termui/example/barchart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b/lattice/master/ltc/Godeps/_workspace/src/github.com/gizak/termui/example/barchart.png -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/gomega/matchers/support/goraph/node/node.go: -------------------------------------------------------------------------------- 1 | package node 2 | 3 | type Node struct { 4 | Id int 5 | } 6 | 7 | type NodeOrderedSet []Node 8 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/gizak/termui/example/dashboard.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b/lattice/master/ltc/Godeps/_workspace/src/github.com/gizak/termui/example/dashboard.gif -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/gizak/termui/example/linechart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b/lattice/master/ltc/Godeps/_workspace/src/github.com/gizak/termui/example/linechart.png -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/gizak/termui/example/sparklines.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b/lattice/master/ltc/Godeps/_workspace/src/github.com/gizak/termui/example/sparklines.png -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/daemon/graphdriver/devmapper/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Alexander Larsson (@alexlarsson) 2 | Vincent Batts (@vbatts) 3 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/gizak/termui/example/themedefault.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b/lattice/master/ltc/Godeps/_workspace/src/github.com/gizak/termui/example/themedefault.png -------------------------------------------------------------------------------- /cluster/brain/brain_health_check: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | /var/lattice/health_check "consul" "doppler" "etcd" "file-server" "gnatsd" "gorouter" "receptor" "route-emitter" "trafficcontroller" "metron" 4 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/gizak/termui/example/themehelloworld.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b/lattice/master/ltc/Godeps/_workspace/src/github.com/gizak/termui/example/themehelloworld.png -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/libtrust/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Solomon Hykes 2 | Josh Hawn (github: jlhawn) 3 | Derek McGowan (github: dmcgowan) 4 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/ginkgo/ginkgo/interrupthandler/sigquit_swallower_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package interrupthandler 4 | 5 | func SwallowSigQuit() { 6 | //noop 7 | } 8 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/Sirupsen/logrus/terminal_openbsd.go: -------------------------------------------------------------------------------- 1 | 2 | package logrus 3 | 4 | import "syscall" 5 | 6 | const ioctlReadTermios = syscall.TIOCGETA 7 | 8 | type Termios syscall.Termios 9 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/pkg/archive/testdata/broken.tar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b/lattice/master/ltc/Godeps/_workspace/src/github.com/docker/docker/pkg/archive/testdata/broken.tar -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/gomega/matchers/support/goraph/util/util.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import "math" 4 | 5 | func Odd(n int) bool { 6 | return math.Mod(float64(n), 2.0) == 1.0 7 | } 8 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/pkg/tarsum/testdata/xattr/layer.tar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b/lattice/master/ltc/Godeps/_workspace/src/github.com/docker/docker/pkg/tarsum/testdata/xattr/layer.tar -------------------------------------------------------------------------------- /cluster/common/system-config/lattice.logrotate.txt: -------------------------------------------------------------------------------- 1 | /var/lattice/log/*.log { 2 | size 100M 3 | missingok 4 | rotate 5 5 | compress 6 | notifempty 7 | create 644 root root 8 | } 9 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/pkg/system/meminfo_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package system 4 | 5 | func ReadMemInfo() (*MemInfo, error) { 6 | return nil, ErrNotSupportedPlatform 7 | } 8 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/codegangsta/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 | -------------------------------------------------------------------------------- /cluster/brain/upstart/bootstrap.conf: -------------------------------------------------------------------------------- 1 | #!upstart 2 | 3 | start on (local-filesystems and net-device-up IFACE!=lo) 4 | 5 | pre-start script 6 | echo "UPSTART: Trying to start lattice bootstrap service - `date --rfc-3339=ns`" 7 | end script 8 | -------------------------------------------------------------------------------- /cluster/cell/upstart/bootstrap.conf: -------------------------------------------------------------------------------- 1 | #!upstart 2 | 3 | start on (local-filesystems and net-device-up IFACE!=lo) 4 | 5 | pre-start script 6 | echo "UPSTART: Trying to start lattice bootstrap service - `date --rfc-3339=ns`" 7 | end script 8 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/daemon/graphdriver/driver_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package graphdriver 4 | 5 | func GetFSMagic(rootpath string) (FsMagic, error) { 6 | return FsMagicUnsupported, nil 7 | } 8 | -------------------------------------------------------------------------------- /ltc/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 = errors.New("platform and architecture is not supported") 9 | ) 10 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/cloudfoundry-incubator/runtime-schema/models/port_mapping.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | type PortMapping struct { 4 | ContainerPort uint16 `json:"container_port"` 5 | HostPort uint16 `json:"host_port,omitempty"` 6 | } 7 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/cloudfoundry/noaa/events/generate-events.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -x 2 | 3 | OUT_DIR=`dirname $0` 4 | OUT_DIR=`cd $OUT_DIR && pwd` 5 | 6 | PROTO_DIR=$OUT_DIR/../dropsonde-protocol 7 | 8 | cd $PROTO_DIR 9 | ./generate-go.sh $OUT_DIR -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/pkg/system/lstat_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package system 4 | 5 | func Lstat(path string) (*Stat, error) { 6 | // should not be called on cli code path 7 | return nil, ErrNotSupportedPlatform 8 | } 9 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/mattn/go-runewidth/runewidth_js.go: -------------------------------------------------------------------------------- 1 | // +build js 2 | 3 | package runewidth 4 | 5 | func IsEastAsian() bool { 6 | // TODO: Implement this for the web. Detect east asian in a compatible way, and return true. 7 | return false 8 | } 9 | -------------------------------------------------------------------------------- /ltc/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 | func Umask(newmask int) (oldmask int, err error) { 10 | return syscall.Umask(newmask), nil 11 | } 12 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /ltc/logs/logs_suite_test.go: -------------------------------------------------------------------------------- 1 | package logs_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestLogs(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Logs Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "os" 5 | 6 | "github.com/cloudfoundry-incubator/lattice/ltc/setup_cli" 7 | ) 8 | 9 | func main() { 10 | defer os.Stdout.Write([]byte("\n")) 11 | cliApp := setup_cli.NewCliApp() 12 | cliApp.Run(os.Args) 13 | } 14 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar/testdata/v7.tar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b/lattice/master/ltc/Godeps/_workspace/src/github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar/testdata/v7.tar -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/gorilla/websocket/AUTHORS: -------------------------------------------------------------------------------- 1 | # This is the official list of Gorilla WebSocket authors for copyright 2 | # purposes. 3 | # 4 | # Please keep the list sorted. 5 | 6 | Gary Burd 7 | Joachim Bauch 8 | 9 | -------------------------------------------------------------------------------- /ltc/config/config_suite_test.go: -------------------------------------------------------------------------------- 1 | package config_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestConfig(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Config Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/cloudfoundry/noaa/debug_printer.go: -------------------------------------------------------------------------------- 1 | package noaa 2 | 3 | type DebugPrinter interface { 4 | Print(title, dump string) 5 | } 6 | 7 | type nullDebugPrinter struct { 8 | } 9 | 10 | func (nullDebugPrinter) Print(title, body string) { 11 | } 12 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/api/README.md: -------------------------------------------------------------------------------- 1 | This directory contains code pertaining to the Docker API: 2 | 3 | - Used by the docker client when communicating with the docker daemon 4 | 5 | - Used by third party tools wishing to interface with the docker daemon 6 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/engine/helpers_test.go: -------------------------------------------------------------------------------- 1 | package engine 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | var globalTestID string 8 | 9 | func mkJob(t *testing.T, name string, args ...string) *Job { 10 | return New().Job(name, args...) 11 | } 12 | -------------------------------------------------------------------------------- /ltc/main_suite_test.go: -------------------------------------------------------------------------------- 1 | package main_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestLatticeCli(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "LatticeCli Main Suite") 13 | } 14 | -------------------------------------------------------------------------------- /terraform/aws/outputs.tf: -------------------------------------------------------------------------------- 1 | output "lattice_target" { 2 | value = "${aws_eip.ip.public_ip}.xip.io" 3 | } 4 | 5 | output "lattice_username" { 6 | value = "${var.lattice_username}" 7 | } 8 | 9 | output "lattice_password" { 10 | value = "${var.lattice_password}" 11 | } 12 | -------------------------------------------------------------------------------- /ltc/config/config_helpers/config_helpers.go: -------------------------------------------------------------------------------- 1 | package config_helpers 2 | 3 | import ( 4 | "path/filepath" 5 | ) 6 | 7 | func ConfigFileLocation(homeDir string) string { 8 | configDir := filepath.Join(homeDir, ".lattice") 9 | return filepath.Join(configDir, "config.json") 10 | } 11 | -------------------------------------------------------------------------------- /ltc/terminal/colors/colors_suite_test.go: -------------------------------------------------------------------------------- 1 | package colors_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestColors(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Colors Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/terminal/cursor/cursor_suite_test.go: -------------------------------------------------------------------------------- 1 | package cursor_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestCursor(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Cursor Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/terminal/terminal_suite_test.go: -------------------------------------------------------------------------------- 1 | package terminal_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestTerminal(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Terminal Suite") 13 | } 14 | -------------------------------------------------------------------------------- /tee2metron/tee2metron_suite_test.go: -------------------------------------------------------------------------------- 1 | package main_test 2 | 3 | import ( 4 | "testing" 5 | 6 | . "github.com/onsi/ginkgo" 7 | . "github.com/onsi/gomega" 8 | ) 9 | 10 | func TestTee2metron(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Tee2metron Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/pkg/tarsum/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Derek McGowan (github: dmcgowan) 2 | Eric Windisch (github: ewindisch) 3 | Josh Hawn (github: jlhawn) 4 | Vincent Batts (github: vbatts) 5 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar/testdata/writer-big.tar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b/lattice/master/ltc/Godeps/_workspace/src/github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar/testdata/writer-big.tar -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/cloudfoundry-incubator/runtime-schema/models/cc_upload_staging_uri_key.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | const CcBuildArtifactsUploadUriKey = "cc-build-artifacts-upload-uri" 4 | const CcDropletUploadUriKey = "cc-droplet-upload-uri" 5 | 6 | const CcTimeoutKey = "timeout" 7 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/registry/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Sam Alba (@samalba) 2 | Joffrey Fuhrer (@shin-) 3 | Ken Cochrane (@kencochrane) 4 | Vincent Batts (@vbatts) 5 | Olivier Gambier (@dmp42) 6 | -------------------------------------------------------------------------------- /ltc/config/target_verifier/receptor_client_factory/receptor_client_factory.go: -------------------------------------------------------------------------------- 1 | package receptor_client_factory 2 | 3 | import ( 4 | "github.com/cloudfoundry-incubator/receptor" 5 | ) 6 | 7 | func MakeReceptorClient(target string) receptor.Client { 8 | return receptor.NewClient(target) 9 | } 10 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/image/graph.go: -------------------------------------------------------------------------------- 1 | package image 2 | 3 | import ( 4 | "github.com/docker/docker/daemon/graphdriver" 5 | ) 6 | 7 | type Graph interface { 8 | Get(id string) (*Image, error) 9 | ImageRoot(id string) string 10 | Driver() graphdriver.Driver 11 | } 12 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar/testdata/writer-big-long.tar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b/lattice/master/ltc/Godeps/_workspace/src/github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar/testdata/writer-big-long.tar -------------------------------------------------------------------------------- /ltc/config/persister/persister_suite_test.go: -------------------------------------------------------------------------------- 1 | package persister_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestPersister(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Persister Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/logs/console_tailed_logs_outputter/chug/chug_suite_test.go: -------------------------------------------------------------------------------- 1 | package chug_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestChug(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Chug Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/vito/go-sse/sse/sse_suite_test.go: -------------------------------------------------------------------------------- 1 | package sse_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestSSE(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "SSE Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/app_examiner/app_examiner_suite_test.go: -------------------------------------------------------------------------------- 1 | package app_examiner_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestAppExaminer(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "AppExaminer Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/exit_handler/exit_handler_suite_test.go: -------------------------------------------------------------------------------- 1 | package exit_handler_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestExitHandler(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "ExitHandler Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/test_helpers/matchers/matchers_suite_test.go: -------------------------------------------------------------------------------- 1 | package matchers_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestMatchers(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | 13 | RunSpecs(t, "Matchers Suite") 14 | } 15 | -------------------------------------------------------------------------------- /ltc/test_helpers/test_helpers_suite_test.go: -------------------------------------------------------------------------------- 1 | package test_helpers_test 2 | 3 | import ( 4 | "testing" 5 | 6 | . "github.com/onsi/ginkgo" 7 | . "github.com/onsi/gomega" 8 | ) 9 | 10 | func TestTestHelpers(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "TestHelpers Suite") 13 | } 14 | -------------------------------------------------------------------------------- /terraform/google/outputs.tf: -------------------------------------------------------------------------------- 1 | output "lattice_target" { 2 | value = "${google_compute_address.lattice-brain.address}.xip.io" 3 | } 4 | 5 | output "lattice_username" { 6 | value = "${var.lattice_username}" 7 | } 8 | 9 | output "lattice_password" { 10 | value = "${var.lattice_password}" 11 | } 12 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/tedsuo/rata/router_suite_test.go: -------------------------------------------------------------------------------- 1 | package rata_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestRouter(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Rata Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/route_helpers/route_helpers_suite_test.go: -------------------------------------------------------------------------------- 1 | package route_helpers_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestRouteHelpers(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "RouteHelpers Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/cloudfoundry/noaa/noaa_suite_test.go: -------------------------------------------------------------------------------- 1 | package noaa_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestNoaa(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Noaa Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/gorilla/mux/README.md: -------------------------------------------------------------------------------- 1 | mux 2 | === 3 | [![Build Status](https://travis-ci.org/gorilla/mux.png?branch=master)](https://travis-ci.org/gorilla/mux) 4 | 5 | gorilla/mux is a powerful URL router and dispatcher. 6 | 7 | Read the full documentation here: http://www.gorillatoolkit.org/pkg/mux 8 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/ginkgo/types/types_suite_test.go: -------------------------------------------------------------------------------- 1 | package types_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestTypes(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Types Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/gomega/internal/testingtsupport/testing_t_support_test.go: -------------------------------------------------------------------------------- 1 | package testingtsupport_test 2 | 3 | import ( 4 | . "github.com/onsi/gomega" 5 | 6 | "testing" 7 | ) 8 | 9 | func TestTestingT(t *testing.T) { 10 | RegisterTestingT(t) 11 | Ω(true).Should(BeTrue()) 12 | } 13 | -------------------------------------------------------------------------------- /terraform/digitalocean/outputs.tf: -------------------------------------------------------------------------------- 1 | output "lattice_target" { 2 | value = "${digitalocean_droplet.lattice-brain.ipv4_address}.xip.io" 3 | } 4 | 5 | output "lattice_username" { 6 | value = "${var.lattice_username}" 7 | } 8 | 9 | output "lattice_password" { 10 | value = "${var.lattice_password}" 11 | } 12 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/cloudfoundry-incubator/receptor/fake_receptor/fake_client_test.go: -------------------------------------------------------------------------------- 1 | package fake_receptor_test 2 | 3 | import ( 4 | _ "github.com/cloudfoundry-incubator/receptor/fake_receptor" 5 | 6 | . "github.com/onsi/ginkgo" 7 | ) 8 | 9 | var _ = Describe("FakeClient", func() { 10 | 11 | }) 12 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/ginkgo/internal/spec/spec_suite_test.go: -------------------------------------------------------------------------------- 1 | package spec_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestSpec(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Spec Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/gomega/format/format_suite_test.go: -------------------------------------------------------------------------------- 1 | package format_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestFormat(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Format Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/pivotal-golang/lager/chug/chug_suite_test.go: -------------------------------------------------------------------------------- 1 | package chug_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestChug(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Chug Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/pivotal-golang/lager/lager_suite_test.go: -------------------------------------------------------------------------------- 1 | package lager_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestLager(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Lager Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/cli_app_factory/cli_app_factory_suite_test.go: -------------------------------------------------------------------------------- 1 | package cli_app_factory_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestCliAppFactory(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "CliAppFactory Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/config/config_helpers/config_helpers_suite_test.go: -------------------------------------------------------------------------------- 1 | package config_helpers_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestConfigHelpers(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "ConfigHelpers Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/logs/console_tailed_logs_outputter/prettify/prettify_suite_test.go: -------------------------------------------------------------------------------- 1 | package prettify_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestPrettify(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Prettify Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/gomega/gbytes/gbuffer_suite_test.go: -------------------------------------------------------------------------------- 1 | package gbytes_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestGbytes(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Gbytes Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/gomega/ghttp/test_server_suite_test.go: -------------------------------------------------------------------------------- 1 | package ghttp_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestGHTTP(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "GHTTP Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/config/target_verifier/target_verifier_suite_test.go: -------------------------------------------------------------------------------- 1 | package target_verifier_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestTargetVerifier(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "TargetVerifier Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/ginkgo/internal/failer/failer_suite_test.go: -------------------------------------------------------------------------------- 1 | package failer_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestFailer(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Failer Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/ginkgo/internal/writer/writer_suite_test.go: -------------------------------------------------------------------------------- 1 | package writer_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestWriter(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Writer Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/cloudfoundry-incubator/cf_http/cf_http_suite_test.go: -------------------------------------------------------------------------------- 1 | package cf_http_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestCfHttp(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "CfHttp Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/cloudfoundry-incubator/receptor/event/event_suite_test.go: -------------------------------------------------------------------------------- 1 | package event_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestEvent(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Event Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/ginkgo/reporters/reporters_suite_test.go: -------------------------------------------------------------------------------- 1 | package reporters_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestReporters(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Reporters Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/gomega/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.3 4 | 5 | install: 6 | - go get -v ./... 7 | - go get github.com/onsi/ginkgo 8 | - go install github.com/onsi/ginkgo/ginkgo 9 | 10 | script: $HOME/gopath/bin/ginkgo -r --randomizeAllSpecs --failOnPending --randomizeSuites --race 11 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/pivotal-golang/bytefmt/formatters_suite_test.go: -------------------------------------------------------------------------------- 1 | package bytefmt_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestFormatters(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Bytefmt Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/app_examiner/command_factory/presentation/presentation_suite_test.go: -------------------------------------------------------------------------------- 1 | package presentation_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestPresentation(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Presentation Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/app_runner/docker_app_runner/docker_app_runner_suite_test.go: -------------------------------------------------------------------------------- 1 | package docker_app_runner_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestAppRunning(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "DockerAppRunner Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/logs/command_factory/command_factory_suite_test.go: -------------------------------------------------------------------------------- 1 | package command_factory_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestLogsCommandFactory(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Logs CommandFactory Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/pkg/system/stat_linux.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import ( 4 | "syscall" 5 | ) 6 | 7 | func fromStatT(s *syscall.Stat_t) (*Stat, error) { 8 | return &Stat{size: s.Size, 9 | mode: s.Mode, 10 | uid: s.Uid, 11 | gid: s.Gid, 12 | rdev: s.Rdev, 13 | mtim: s.Mtim}, nil 14 | } 15 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/pkg/system/stat_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package system 4 | 5 | import ( 6 | "errors" 7 | "syscall" 8 | ) 9 | 10 | func fromStatT(s *syscall.Win32FileAttributeData) (*Stat, error) { 11 | return nil, errors.New("fromStatT should not be called on windows path") 12 | } 13 | -------------------------------------------------------------------------------- /ltc/config/command_factory/command_factory_suite_test.go: -------------------------------------------------------------------------------- 1 | package command_factory_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestConfigCommandFactory(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Config CommandFactory Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/cloudfoundry-incubator/receptor/receptor_suite_test.go: -------------------------------------------------------------------------------- 1 | package receptor_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestReceptor(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Receptor Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/cloudfoundry-incubator/receptor/watcher/watcher_suite_test.go: -------------------------------------------------------------------------------- 1 | package watcher_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestWatcher(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Watcher Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/cloudfoundry-incubator/runtime-schema/models/rootfs.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import "net/url" 4 | 5 | const PreloadedRootFSScheme = "preloaded" 6 | 7 | func PreloadedRootFS(stack string) string { 8 | return (&url.URL{ 9 | Scheme: PreloadedRootFSScheme, 10 | Opaque: stack, 11 | }).String() 12 | } 13 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/daemon/graphdriver/aufs/mount_linux.go: -------------------------------------------------------------------------------- 1 | package aufs 2 | 3 | import "syscall" 4 | 5 | const MsRemount = syscall.MS_REMOUNT 6 | 7 | func mount(source string, target string, fstype string, flags uintptr, data string) error { 8 | return syscall.Mount(source, target, fstype, flags, data) 9 | } 10 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/mattn/go-runewidth/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - tip 4 | before_install: 5 | - go get github.com/axw/gocov/gocov 6 | - go get github.com/mattn/goveralls 7 | - go get golang.org/x/tools/cmd/cover 8 | script: 9 | - $HOME/gopath/bin/goveralls -repotoken lAKAWPzcGsD3A8yBX3BGGtRUdJ6CaGERL 10 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/ginkgo/ginkgo/testsuite/testsuite_suite_test.go: -------------------------------------------------------------------------------- 1 | package testsuite_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestTestsuite(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Testsuite Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/ginkgo/internal/leafnodes/leaf_node_suite_test.go: -------------------------------------------------------------------------------- 1 | package leafnodes_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestLeafNode(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "LeafNode Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/ginkgo/internal/remote/remote_suite_test.go: -------------------------------------------------------------------------------- 1 | package remote_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestRemote(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Remote Spec Forwarding Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/gomega/internal/assertion/assertion_suite_test.go: -------------------------------------------------------------------------------- 1 | package assertion_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestAssertion(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Assertion Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/pivotal-golang/clock/fakeclock/fakeclock_suite_test.go: -------------------------------------------------------------------------------- 1 | package fakeclock_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestFakeClock(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "FakeClock Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/app_examiner/command_factory/command_factory_suite_test.go: -------------------------------------------------------------------------------- 1 | package command_factory_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestCommandFactory(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "AppExaminer CommandFactory Suite") 13 | } 14 | -------------------------------------------------------------------------------- /tee2metron/test_helpers/chatty_process/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | "time" 7 | ) 8 | 9 | func main() { 10 | for { 11 | fmt.Fprintf(os.Stdout, "Hi from stdout. My args are: %s\n", os.Args[1:]) 12 | fmt.Fprintln(os.Stderr, "Oopsie from stderr") 13 | time.Sleep(100 * time.Millisecond) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /cluster/brain/upstart/etcd.conf: -------------------------------------------------------------------------------- 1 | #!upstart 2 | 3 | start on started bootstrap 4 | 5 | stop on shutdown 6 | respawn 7 | 8 | script 9 | echo "UPSTART: Trying to start etcd - `date --rfc-3339=ns`" 10 | etcd --listen-client-urls=http://0.0.0.0:4001 >> /var/lattice/log/etcd-service.log 2>&1 11 | end script 12 | 13 | post-stop exec sleep 5 14 | -------------------------------------------------------------------------------- /cluster/brain/upstart/gnatsd.conf: -------------------------------------------------------------------------------- 1 | #!upstart 2 | 3 | start on started bootstrap 4 | stop on shutdown 5 | respawn 6 | 7 | script 8 | echo "UPSTART: Trying to start gnatsd - `date --rfc-3339=ns`" 9 | 10 | gnatsd -c /var/lattice/config/gnatsd.conf >> /var/lattice/log/gnatsd-service.log 2>&1 11 | end script 12 | 13 | post-stop exec sleep 5 14 | -------------------------------------------------------------------------------- /cluster/brain/upstart/gorouter.conf: -------------------------------------------------------------------------------- 1 | #!upstart 2 | 3 | start on started gnatsd 4 | stop on shutdown 5 | respawn 6 | 7 | script 8 | echo "UPSTART: Trying to start gorouter - `date --rfc-3339=ns`" 9 | gorouter -c /var/lattice/config/gorouter.yml >> /var/lattice/log/gorouter-service.log 2>&1 10 | end script 11 | 12 | post-stop exec sleep 5 13 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /ltc/app_runner/command_factory/command_factory_suite_test.go: -------------------------------------------------------------------------------- 1 | package command_factory_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestAppRunnerCommandFactory(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "AppRunner CommandFactory Suite") 13 | } 14 | -------------------------------------------------------------------------------- /cluster/brain/upstart/metron.conf: -------------------------------------------------------------------------------- 1 | #!upstart 2 | 3 | start on started gnatsd 4 | stop on shutdown 5 | respawn 6 | 7 | script 8 | echo "UPSTART: Trying to start metron - `date --rfc-3339=ns`" 9 | 10 | metron --config /var/lattice/config/metron.json >> /var/lattice/log/metron-service.log 2>&1 11 | end script 12 | 13 | post-stop exec sleep 5 14 | -------------------------------------------------------------------------------- /cluster/cell/upstart/metron.conf: -------------------------------------------------------------------------------- 1 | #!upstart 2 | 3 | start on started consul 4 | stop on shutdown 5 | respawn 6 | 7 | script 8 | echo "UPSTART: Trying to start metron - `date --rfc-3339=ns`" 9 | 10 | metron --config /var/lattice/config/metron.json >> /var/lattice/log/metron-service.log 2>&1 11 | end script 12 | 13 | post-stop exec sleep 5 14 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/daemon/graphdriver/btrfs/version_test.go: -------------------------------------------------------------------------------- 1 | // +build linux 2 | 3 | package btrfs 4 | 5 | import ( 6 | "testing" 7 | ) 8 | 9 | func TestBuildVersion(t *testing.T) { 10 | if len(BtrfsBuildVersion()) == 0 { 11 | t.Errorf("expected output from btrfs build version, but got empty string") 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ltc/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 | func Lstat(path string) (*Stat, error) { 10 | s := &syscall.Stat_t{} 11 | err := syscall.Lstat(path, s) 12 | if err != nil { 13 | return nil, err 14 | } 15 | return fromStatT(s) 16 | } 17 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/ginkgo/internal/specrunner/spec_runner_suite_test.go: -------------------------------------------------------------------------------- 1 | package specrunner_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestSpecRunner(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Spec Runner Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/integration_test/command_factory/command_factory_suite_test.go: -------------------------------------------------------------------------------- 1 | package command_factory_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestCommandFactory(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "IntegrationTest CommandFactory Suite") 13 | } 14 | -------------------------------------------------------------------------------- /cluster/brain/upstart/doppler.conf: -------------------------------------------------------------------------------- 1 | #!upstart 2 | 3 | start on started gnatsd 4 | stop on shutdown 5 | respawn 6 | 7 | script 8 | echo "UPSTART: Trying to start doppler - `date --rfc-3339=ns`" 9 | 10 | doppler --config /var/lattice/config/doppler.json >> /var/lattice/log/doppler-service.log 2>&1 11 | end script 12 | 13 | post-stop exec sleep 5 14 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/ginkgo/internal/codelocation/code_location_suite_test.go: -------------------------------------------------------------------------------- 1 | package codelocation_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestCodelocation(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "CodeLocation Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/daemon/graphdriver/aufs/mount_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package aufs 4 | 5 | import "errors" 6 | 7 | const MsRemount = 0 8 | 9 | func mount(source string, target string, fstype string, flags uintptr, data string) (err error) { 10 | return errors.New("mount is not implemented on darwin") 11 | } 12 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/ginkgo/internal/containernode/container_node_suite_test.go: -------------------------------------------------------------------------------- 1 | package containernode_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestContainernode(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Containernode Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/cloudfoundry-incubator/receptor/task_handler/task_handler_suite_test.go: -------------------------------------------------------------------------------- 1 | package task_handler_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestTaskHandler(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "TaskHandler Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/pkg/parsers/kernel/uname_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package kernel 4 | 5 | import ( 6 | "errors" 7 | ) 8 | 9 | type Utsname struct { 10 | Release [65]byte 11 | } 12 | 13 | func uname() (*Utsname, error) { 14 | return nil, errors.New("Kernel version detection is available only on linux") 15 | } 16 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/gizak/termui/chart_others.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 Zack Guo . All rights reserved. 2 | // Use of this source code is governed by a MIT license that can 3 | // be found in the LICENSE file. 4 | 5 | // +build !windows 6 | 7 | package termui 8 | 9 | const VDASH = '┊' 10 | const HDASH = '┈' 11 | const ORIGIN = '└' 12 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/gizak/termui/chart_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 Zack Guo . All rights reserved. 2 | // Use of this source code is governed by a MIT license that can 3 | // be found in the LICENSE file. 4 | 5 | // +build windows 6 | 7 | package termui 8 | 9 | const VDASH = '|' 10 | const HDASH = '-' 11 | const ORIGIN = '+' 12 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/ginkgo/internal/specrunner/random_id.go: -------------------------------------------------------------------------------- 1 | package specrunner 2 | 3 | import ( 4 | "crypto/rand" 5 | "fmt" 6 | ) 7 | 8 | func randomID() string { 9 | b := make([]byte, 8) 10 | _, err := rand.Read(b) 11 | if err != nil { 12 | return "" 13 | } 14 | return fmt.Sprintf("%x-%x-%x-%x", b[0:2], b[2:4], b[4:6], b[6:8]) 15 | } 16 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/gomega/internal/asyncassertion/async_assertion_suite_test.go: -------------------------------------------------------------------------------- 1 | package asyncassertion_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestAsyncAssertion(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "AsyncAssertion Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/pivotal-golang/lager/ginkgoreporter/ginkgoreporter_suite_test.go: -------------------------------------------------------------------------------- 1 | package ginkgoreporter_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestGinkgoReporter(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "GinkgoReporter Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/app_runner/docker_metadata_fetcher/docker_metadata_fetcher_suite_test.go: -------------------------------------------------------------------------------- 1 | package docker_metadata_fetcher_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestDockerMetadataFetcher(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "DockerMetadataFetcher Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/cloudfoundry-incubator/receptor/fake_receptor/fake_receptor_suite_test.go: -------------------------------------------------------------------------------- 1 | package fake_receptor_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestFakeReceptor(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "FakeReceptor Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/cloudfoundry-incubator/receptor/serialization/serialization_suite_test.go: -------------------------------------------------------------------------------- 1 | package serialization_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestSerialization(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Serialization Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/pkg/parsers/kernel/uname_linux.go: -------------------------------------------------------------------------------- 1 | package kernel 2 | 3 | import ( 4 | "syscall" 5 | ) 6 | 7 | type Utsname syscall.Utsname 8 | 9 | func uname() (*syscall.Utsname, error) { 10 | uts := &syscall.Utsname{} 11 | 12 | if err := syscall.Uname(uts); err != nil { 13 | return nil, err 14 | } 15 | return uts, nil 16 | } 17 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/ginkgo/ginkgo/interrupthandler/sigquit_swallower_unix.go: -------------------------------------------------------------------------------- 1 | // +build freebsd openbsd netbsd dragonfly darwin linux 2 | 3 | package interrupthandler 4 | 5 | import ( 6 | "os" 7 | "os/signal" 8 | "syscall" 9 | ) 10 | 11 | func SwallowSigQuit() { 12 | c := make(chan os.Signal, 1024) 13 | signal.Notify(c, syscall.SIGQUIT) 14 | } 15 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/utils/random.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | import ( 4 | "crypto/rand" 5 | "encoding/hex" 6 | "io" 7 | ) 8 | 9 | func RandomString() string { 10 | id := make([]byte, 32) 11 | 12 | if _, err := io.ReadFull(rand.Reader, id); err != nil { 13 | panic(err) // This shouldn't happen 14 | } 15 | return hex.EncodeToString(id) 16 | } 17 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/pivotal-golang/bytefmt/README.md: -------------------------------------------------------------------------------- 1 | bytefmt 2 | ======= 3 | 4 | Human readable byte formatter 5 | 6 | Example: 7 | 8 | ```go 9 | bytefmt.ByteSize(100.5*bytefmt.MEGABYE) // returns "100.5M" 10 | bytefmt.ByteSize(uint64(1024)) // returns "1K" 11 | ``` 12 | 13 | For documentation, please see http://godoc.org/github.com/pivotal-golang/bytefmt 14 | -------------------------------------------------------------------------------- /ltc/app_runner/docker_app_runner/existing_app_error.go: -------------------------------------------------------------------------------- 1 | package docker_app_runner 2 | 3 | import "fmt" 4 | 5 | type existingAppError string 6 | 7 | func newExistingAppError(appName string) existingAppError { 8 | return existingAppError(appName) 9 | } 10 | 11 | func (appName existingAppError) Error() string { 12 | return fmt.Sprintf("%s is already running", string(appName)) 13 | } 14 | -------------------------------------------------------------------------------- /ltc/logs/console_tailed_logs_outputter/console_tailed_logs_outputter_suite_test.go: -------------------------------------------------------------------------------- 1 | package console_tailed_logs_outputter_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestConsoleTailedLogOutputter(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "ConsoleTailedLogsOutputter Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/daemon/graphdriver/btrfs/version_none.go: -------------------------------------------------------------------------------- 1 | // +build linux,btrfs_noversion 2 | 3 | package btrfs 4 | 5 | // TODO(vbatts) remove this work-around once supported linux distros are on 6 | // btrfs utililties of >= 3.16.1 7 | 8 | func BtrfsBuildVersion() string { 9 | return "-" 10 | } 11 | func BtrfsLibVersion() int { 12 | return -1 13 | } 14 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/daemon/graphdriver/driver_linux.go: -------------------------------------------------------------------------------- 1 | package graphdriver 2 | 3 | import ( 4 | "path" 5 | "syscall" 6 | ) 7 | 8 | func GetFSMagic(rootpath string) (FsMagic, error) { 9 | var buf syscall.Statfs_t 10 | if err := syscall.Statfs(path.Dir(rootpath), &buf); err != nil { 11 | return 0, err 12 | } 13 | return FsMagic(buf.Type), nil 14 | } 15 | -------------------------------------------------------------------------------- /ltc/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 | 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 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/ginkgo/internal/remote/output_interceptor.go: -------------------------------------------------------------------------------- 1 | package remote 2 | 3 | /* 4 | The OutputInterceptor is used by the ForwardingReporter to 5 | intercept and capture all stdin and stderr output during a test run. 6 | */ 7 | type OutputInterceptor interface { 8 | StartInterceptingOutput() error 9 | StopInterceptingAndReturnOutput() (string, error) 10 | } 11 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/ginkgo/types/code_location.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | type CodeLocation struct { 8 | FileName string 9 | LineNumber int 10 | FullStackTrace string 11 | } 12 | 13 | func (codeLocation CodeLocation) String() string { 14 | return fmt.Sprintf("%s:%d", codeLocation.FileName, codeLocation.LineNumber) 15 | } 16 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/pivotal-golang/clock/ticker.go: -------------------------------------------------------------------------------- 1 | package clock 2 | 3 | import "time" 4 | 5 | type Ticker interface { 6 | C() <-chan time.Time 7 | Stop() 8 | } 9 | 10 | type realTicker struct { 11 | t *time.Ticker 12 | } 13 | 14 | func (t *realTicker) C() <-chan time.Time { 15 | return t.t.C 16 | } 17 | 18 | func (t *realTicker) Stop() { 19 | t.t.Stop() 20 | } 21 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/pkg/system/stat_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!windows 2 | 3 | package system 4 | 5 | import ( 6 | "syscall" 7 | ) 8 | 9 | func fromStatT(s *syscall.Stat_t) (*Stat, error) { 10 | return &Stat{size: s.Size, 11 | mode: uint32(s.Mode), 12 | uid: s.Uid, 13 | gid: s.Gid, 14 | rdev: uint64(s.Rdev), 15 | mtim: s.Mtimespec}, nil 16 | } 17 | -------------------------------------------------------------------------------- /ltc/app_runner/docker_app_runner/app_not_started_error.go: -------------------------------------------------------------------------------- 1 | package docker_app_runner 2 | 3 | import "fmt" 4 | 5 | type appNotStartedError string 6 | 7 | func newAppNotStartedError(appName string) appNotStartedError { 8 | return appNotStartedError(appName) 9 | } 10 | 11 | func (appName appNotStartedError) Error() string { 12 | return fmt.Sprintf("%s is not started.", string(appName)) 13 | } 14 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /ltc/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 | -------------------------------------------------------------------------------- /ltc/app_runner/docker_repository_name_formatter/docker_repository_name_formatter_suite_test.go: -------------------------------------------------------------------------------- 1 | package docker_repository_name_formatter_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestDockerRepositoryNameFormatter(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "DockerRepositoryNameFormatter Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ltc/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 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/cloudfoundry/noaa/errors/unauthorized_error.go: -------------------------------------------------------------------------------- 1 | package errors 2 | 3 | type UnauthorizedError struct { 4 | description string 5 | } 6 | 7 | func NewUnauthorizedError(description string) error { 8 | return &UnauthorizedError{description: description} 9 | } 10 | 11 | func (err *UnauthorizedError) Error() string { 12 | return "Unauthorized error: " + err.description 13 | } 14 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/gorilla/websocket/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/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 | // should not be called on cli code path 7 | return ErrNotSupportedPlatform 8 | } 9 | 10 | func Mkdev(major int64, minor int64) uint32 { 11 | panic("Mkdev not implemented on windows, should not be called on cli code") 12 | } 13 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/ginkgo/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.4 4 | 5 | install: 6 | - go get -v ./... 7 | - go get golang.org/x/tools/cmd/cover 8 | - go get github.com/onsi/gomega 9 | - go install github.com/onsi/ginkgo/ginkgo 10 | - export PATH=$PATH:$HOME/gopath/bin 11 | 12 | script: $HOME/gopath/bin/ginkgo -r --randomizeAllSpecs --failOnPending --randomizeSuites --race 13 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/pkg/tarsum/writercloser.go: -------------------------------------------------------------------------------- 1 | package tarsum 2 | 3 | import ( 4 | "io" 5 | ) 6 | 7 | type writeCloseFlusher interface { 8 | io.WriteCloser 9 | Flush() error 10 | } 11 | 12 | type nopCloseFlusher struct { 13 | io.Writer 14 | } 15 | 16 | func (n *nopCloseFlusher) Close() error { 17 | return nil 18 | } 19 | 20 | func (n *nopCloseFlusher) Flush() error { 21 | return nil 22 | } 23 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/gizak/termui/.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 | -------------------------------------------------------------------------------- /ltc/scripts/test: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set +e 3 | 4 | pushd $(dirname $(dirname $0)) > /dev/null 5 | 6 | if [ -z "$GO_PIPELINE_NAME" ]; then #Locally run with color. 7 | ginkgo -r --randomizeAllSpecs --randomizeSuites --failOnPending --trace --race 8 | else 9 | ginkgo -r --randomizeAllSpecs --randomizeSuites --failOnPending --trace --race --noColor 10 | fi 11 | TEST_RESULT=$? 12 | 13 | popd > /dev/null 14 | exit $TEST_RESULT 15 | -------------------------------------------------------------------------------- /cluster/cell/upstart/converger.conf: -------------------------------------------------------------------------------- 1 | #!upstart 2 | 3 | start on started consul 4 | stop on shutdown 5 | respawn 6 | 7 | script 8 | echo "UPSTART: Trying to start converger - `date --rfc-3339=ns`" 9 | 10 | converger \ 11 | -etcdCluster http://etcd.service.dc1.consul:4001 \ 12 | -consulCluster="http://127.0.0.1:8500" \ 13 | >> /var/lattice/log/converger-service.log 2>&1 14 | end script 15 | 16 | post-stop exec sleep 5 17 | -------------------------------------------------------------------------------- /cluster/cell/upstart/auctioneer.conf: -------------------------------------------------------------------------------- 1 | #!upstart 2 | 3 | start on started consul 4 | stop on shutdown 5 | respawn 6 | 7 | script 8 | echo "UPSTART: Trying to start auctioneer - `date --rfc-3339=ns`" 9 | 10 | auctioneer \ 11 | -etcdCluster http://etcd.service.dc1.consul:4001 \ 12 | -consulCluster="http://127.0.0.1:8500" \ 13 | >> /var/lattice/log/auctioneer-service.log 2>&1 14 | end script 15 | 16 | post-stop exec sleep 5 17 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/gorilla/websocket/examples/autobahn/README.md: -------------------------------------------------------------------------------- 1 | # Test Server 2 | 3 | This package contains a server for the [Autobahn WebSockets Test Suite](http://autobahn.ws/testsuite). 4 | 5 | To test the server, run 6 | 7 | go run server.go 8 | 9 | and start the client test driver 10 | 11 | wstest -m fuzzingclient -s fuzzingclient.json 12 | 13 | When the client completes, it writes a report to reports/clients/index.html. 14 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/ginkgo/internal/leafnodes/interfaces.go: -------------------------------------------------------------------------------- 1 | package leafnodes 2 | 3 | import ( 4 | "github.com/onsi/ginkgo/types" 5 | ) 6 | 7 | type BasicNode interface { 8 | Type() types.SpecComponentType 9 | Run() (types.SpecState, types.SpecFailure) 10 | CodeLocation() types.CodeLocation 11 | } 12 | 13 | type SubjectNode interface { 14 | BasicNode 15 | 16 | Text() string 17 | Flag() types.FlagType 18 | Samples() int 19 | } 20 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/gizak/termui/box_others.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 Zack Guo . All rights reserved. 2 | // Use of this source code is governed by a MIT license that can 3 | // be found in the LICENSE file. 4 | 5 | // +build !windows 6 | 7 | package termui 8 | 9 | const TOP_RIGHT = '┐' 10 | const VERTICAL_LINE = '│' 11 | const HORIZONTAL_LINE = '─' 12 | const TOP_LEFT = '┌' 13 | const BOTTOM_RIGHT = '┘' 14 | const BOTTOM_LEFT = '└' 15 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/gizak/termui/box_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 Zack Guo . All rights reserved. 2 | // Use of this source code is governed by a MIT license that can 3 | // be found in the LICENSE file. 4 | 5 | // +build windows 6 | 7 | package termui 8 | 9 | const TOP_RIGHT = '+' 10 | const VERTICAL_LINE = '|' 11 | const HORIZONTAL_LINE = '-' 12 | const TOP_LEFT = '+' 13 | const BOTTOM_RIGHT = '+' 14 | const BOTTOM_LEFT = '+' 15 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/pkg/archive/archive_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package archive 4 | 5 | import ( 6 | "github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar" 7 | ) 8 | 9 | func setHeaderForSpecialDevice(hdr *tar.Header, ta *tarAppender, name string, stat interface{}) (nlink uint32, inode uint64, err error) { 10 | // do nothing. no notion of Rdev, Inode, Nlink in stat on Windows 11 | return 12 | } 13 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/utils/tmpdir.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | import ( 4 | "os" 5 | "path/filepath" 6 | ) 7 | 8 | // TempDir returns the default directory to use for temporary files. 9 | func TempDir(rootDir string) (string, error) { 10 | var tmpDir string 11 | if tmpDir = os.Getenv("DOCKER_TMPDIR"); tmpDir == "" { 12 | tmpDir = filepath.Join(rootDir, "tmp") 13 | } 14 | err := os.MkdirAll(tmpDir, 0700) 15 | return tmpDir, err 16 | } 17 | -------------------------------------------------------------------------------- /pipeline/01_compilation/compile_ltc: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | if [[ -z "$LATTICE_SRC_PATH" ]] || [[ -z "$DIEGO_RELEASE_PATH" ]]; then 5 | echo "Must set LATTICE_SRC_PATH and DIEGO_RELEASE_PATH" 6 | exit 1 7 | fi 8 | 9 | source $(dirname $0)/../helpers/build_ltc_helpers 10 | 11 | setup_go_env 12 | 13 | construct_ltc_gopath 14 | 15 | run_unit_tests 16 | 17 | git_describe_lattice 18 | 19 | go_build_ltc 20 | 21 | generate_ltc_tarball "/workspace" 22 | 23 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/codegangsta/cli/autocomplete/bash_autocomplete: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | _cli_bash_autocomplete() { 4 | local cur prev opts base 5 | COMPREPLY=() 6 | cur="${COMP_WORDS[COMP_CWORD]}" 7 | prev="${COMP_WORDS[COMP_CWORD-1]}" 8 | opts=$( ${COMP_WORDS[@]:0:$COMP_CWORD} --generate-bash-completion ) 9 | COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) 10 | return 0 11 | } 12 | 13 | complete -F _cli_bash_autocomplete $PROG -------------------------------------------------------------------------------- /ltc/scripts/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | [ -z "$DEBUG" ] || set -x 4 | 5 | go_version=$(grep -o "\d.\d.\d" <<< $(go version)) 6 | go_version_num=$(tr -d '.' <<< $go_version) 7 | 8 | if [ $go_version_num -lt 140 ] 9 | then 10 | printf "You must have Go 1.4+ installed and set up correctly" 11 | exit 1 12 | fi 13 | 14 | ltc_src=github.com/cloudfoundry-incubator/lattice/ltc 15 | export GOPATH="$GOPATH/src/$ltc_src/Godeps/_workspace:$GOPATH" 16 | 17 | go install $ltc_src 18 | -------------------------------------------------------------------------------- /cluster/brain/upstart/file-server.conf: -------------------------------------------------------------------------------- 1 | #!upstart 2 | 3 | start on started bootstrap 4 | stop on shutdown 5 | respawn 6 | 7 | script 8 | echo "UPSTART: Trying to start file-server - `date --rfc-3339=ns`" 9 | 10 | file-server \ 11 | -address="0.0.0.0:8080" \ 12 | -staticDirectory=/var/lattice/static-files \ 13 | -skipCertVerify=true \ 14 | >> /var/lattice/log/file-server-service.log 2>&1 15 | 16 | end script 17 | 18 | post-stop exec sleep 5 19 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/gorilla/websocket/examples/filewatch/README.md: -------------------------------------------------------------------------------- 1 | # File Watch example. 2 | 3 | This example sends a file to the browser client for display whenever the file is modified. 4 | 5 | $ go get github.com/gorilla/websocket 6 | $ cd `go list -f '{{.Dir}}' github.com/gorilla/websocket/examples/filewatch` 7 | $ go run main.go 8 | # Open http://localhost:8080/ . 9 | # Modify the file to see it update in the browser. 10 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/api/api_unit_test.go: -------------------------------------------------------------------------------- 1 | package api 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func TestJsonContentType(t *testing.T) { 8 | if !MatchesContentType("application/json", "application/json") { 9 | t.Fail() 10 | } 11 | 12 | if !MatchesContentType("application/json; charset=utf-8", "application/json") { 13 | t.Fail() 14 | } 15 | 16 | if MatchesContentType("dockerapplication/json", "application/json") { 17 | t.Fail() 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /cluster/brain/config/gnatsd.conf: -------------------------------------------------------------------------------- 1 | port: 4222 2 | prof_port: 0 3 | monitor_port: 0 4 | 5 | pid_file: "/var/lattice/run/nats.pid" 6 | 7 | debug: false 8 | trace: false 9 | logtime: true 10 | 11 | authorization { 12 | user: "nats" 13 | password: "nats" 14 | timeout: 15 15 | } 16 | 17 | cluster { 18 | host: "127.0.0.1" 19 | port: 4223 20 | 21 | authorization { 22 | user: "nats" 23 | password: "nats" 24 | timeout: 15 25 | } 26 | 27 | routes = [ 28 | 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /ltc/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 | -------------------------------------------------------------------------------- /ltc/terminal/cursor/cursor.go: -------------------------------------------------------------------------------- 1 | package cursor 2 | 3 | import "fmt" 4 | 5 | const csi = "\033[" 6 | 7 | func Up(lines int) string { 8 | return fmt.Sprintf("%s%dA", csi, lines) 9 | } 10 | 11 | func ClearToEndOfLine() string { 12 | return fmt.Sprintf("%s%dK", csi, 0) 13 | } 14 | 15 | func ClearToEndOfDisplay() string { 16 | return fmt.Sprintf("%s%dJ", csi, 0) 17 | } 18 | 19 | func Show() string { 20 | return csi + "?25h" 21 | } 22 | 23 | func Hide() string { 24 | return csi + "?25l" 25 | } 26 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/daemon/graphdriver/aufs/mount.go: -------------------------------------------------------------------------------- 1 | package aufs 2 | 3 | import ( 4 | "os/exec" 5 | "syscall" 6 | 7 | log "github.com/Sirupsen/logrus" 8 | ) 9 | 10 | func Unmount(target string) error { 11 | if err := exec.Command("auplink", target, "flush").Run(); err != nil { 12 | log.Errorf("[warning]: couldn't run auplink before unmount: %s", err) 13 | } 14 | if err := syscall.Unmount(target, 0); err != nil { 15 | return err 16 | } 17 | return nil 18 | } 19 | -------------------------------------------------------------------------------- /ltc/config/persister/mem_persister.go: -------------------------------------------------------------------------------- 1 | package persister 2 | 3 | import ( 4 | "encoding/json" 5 | ) 6 | 7 | func NewMemPersister() Persister { 8 | return &memPersister{} 9 | } 10 | 11 | type memPersister struct { 12 | content []byte 13 | } 14 | 15 | func (m *memPersister) Load(data interface{}) error { 16 | return json.Unmarshal(m.content, data) 17 | } 18 | 19 | func (m *memPersister) Save(data interface{}) error { 20 | var err error 21 | m.content, err = json.Marshal(data) 22 | return err 23 | } 24 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/engine/hack.go: -------------------------------------------------------------------------------- 1 | package engine 2 | 3 | type Hack map[string]interface{} 4 | 5 | func (eng *Engine) Hack_GetGlobalVar(key string) interface{} { 6 | if eng.hack == nil { 7 | return nil 8 | } 9 | val, exists := eng.hack[key] 10 | if !exists { 11 | return nil 12 | } 13 | return val 14 | } 15 | 16 | func (eng *Engine) Hack_SetGlobalVar(key string, val interface{}) { 17 | if eng.hack == nil { 18 | eng.hack = make(Hack) 19 | } 20 | eng.hack[key] = val 21 | } 22 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/bmizerany/pat/bench_test.go: -------------------------------------------------------------------------------- 1 | package pat 2 | 3 | import ( 4 | "net/http" 5 | "testing" 6 | ) 7 | 8 | func BenchmarkPatternMatching(b *testing.B) { 9 | p := New() 10 | p.Get("/hello/:name", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {})) 11 | for n := 0; n < b.N; n++ { 12 | b.StopTimer() 13 | r, err := http.NewRequest("GET", "/hello/blake", nil) 14 | if err != nil { 15 | panic(err) 16 | } 17 | b.StartTimer() 18 | p.ServeHTTP(nil, r) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/cloudfoundry-incubator/receptor/doc/api_cells.md: -------------------------------------------------------------------------------- 1 | # Cells 2 | 3 | To fetch all available Cells: 4 | 5 | ``` 6 | GET /v1/cells 7 | ``` 8 | 9 | This will return an array of `CellResponse` objects. A `CellResponse` is of the form: 10 | 11 | ``` 12 | { 13 | cell_id: "some-cell-id", 14 | zone:"west-wing-1", 15 | capacity:{ 16 | memory_mb: 512, 17 | disk_mb: 1024, 18 | containers: 124 19 | } 20 | } 21 | ``` 22 | 23 | [back](README.md) 24 | 25 | 26 | -------------------------------------------------------------------------------- /ltc/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 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/libtrust/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package libtrust provides an interface for managing authentication and 3 | authorization using public key cryptography. Authentication is handled 4 | using the identity attached to the public key and verified through TLS 5 | x509 certificates, a key challenge, or signature. Authorization and 6 | access control is managed through a trust graph distributed between 7 | both remote trust servers and locally cached and managed data. 8 | */ 9 | package libtrust 10 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/pivotal-golang/clock/timer.go: -------------------------------------------------------------------------------- 1 | package clock 2 | 3 | import "time" 4 | 5 | type Timer interface { 6 | C() <-chan time.Time 7 | Reset(d time.Duration) bool 8 | Stop() bool 9 | } 10 | 11 | type realTimer struct { 12 | t *time.Timer 13 | } 14 | 15 | func (t *realTimer) C() <-chan time.Time { 16 | return t.t.C 17 | } 18 | 19 | func (t *realTimer) Reset(d time.Duration) bool { 20 | return t.t.Reset(d) 21 | } 22 | 23 | func (t *realTimer) Stop() bool { 24 | return t.t.Stop() 25 | } 26 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/mattn/go-runewidth/runewidth_windows.go: -------------------------------------------------------------------------------- 1 | package runewidth 2 | 3 | import ( 4 | "syscall" 5 | ) 6 | 7 | var ( 8 | kernel32 = syscall.NewLazyDLL("kernel32") 9 | procGetConsoleOutputCP = kernel32.NewProc("GetConsoleOutputCP") 10 | ) 11 | 12 | func IsEastAsian() bool { 13 | r1, _, _ := procGetConsoleOutputCP.Call() 14 | if r1 == 0 { 15 | return false 16 | } 17 | 18 | switch int(r1) { 19 | case 932, 51932, 936, 949, 950: 20 | return true 21 | } 22 | 23 | return false 24 | } 25 | -------------------------------------------------------------------------------- /pipeline/01_compilation/compile_lattice_tar: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | pushd /workspace/cf-release/src/loggregator 6 | git submodule update --init --recursive 7 | popd 8 | 9 | ./diego-release/src/github.com/cloudfoundry-incubator/lattice/cluster/scripts/compile \ 10 | /workspace/lattice-build \ 11 | /workspace/diego-release \ 12 | /workspace/cf-release \ 13 | /workspace/diego-release/src/github.com/cloudfoundry-incubator/lattice 14 | 15 | echo "Creating lattice.tgz" 16 | tar cvzf lattice.tgz lattice-build 17 | -------------------------------------------------------------------------------- /images/lattice-pipeline/publish: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | docker pull ubuntu:trusty 6 | docker build --force-rm --no-cache -t $DOCKER_IMAGE lattice/images/pipeline-image/image/ 7 | docker push $DOCKER_IMAGE 8 | 9 | #Also publish to Dockerhub. Lattice is open source! 10 | docker login --email="$DOCKER_HUB_EMAIL" --username="$DOCKER_HUB_USERNAME" --password="$DOCKER_HUB_PASSWORD" 11 | docker build --force-rm --no-cache -t cloudfoundry/lattice-pipeline lattice/images/pipeline-image/image/ 12 | docker push cloudfoundry/lattice-pipeline 13 | -------------------------------------------------------------------------------- /pipeline/02_test/helpers/setup_whetstone: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | setup_whetstone(){ 4 | export GOPATH=$DIEGO_RELEASE_PATH 5 | export LATTICE_CLI_HOME=$WORKSPACE_DIR 6 | 7 | if [ -n "$GO_PIPELINE_NAME" ]; then #If we are running in CI, get the linux ltc binary from the build artifact. 8 | mkdir -pv $GOPATH/bin 9 | tar xvzf ltc.tar.gz -C $GOPATH/bin ltc-linux-amd64 && mv -v $GOPATH/bin/ltc-linux-amd64 $GOPATH/bin/ltc 10 | fi 11 | 12 | mkdir -pv $LATTICE_CLI_HOME/.lattice 13 | export PATH=$PATH:$GOPATH/bin 14 | } 15 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/cloudfoundry-incubator/runtime-schema/models/rootfs_test.go: -------------------------------------------------------------------------------- 1 | package models_test 2 | 3 | import ( 4 | "github.com/cloudfoundry-incubator/runtime-schema/models" 5 | 6 | . "github.com/onsi/ginkgo" 7 | . "github.com/onsi/gomega" 8 | ) 9 | 10 | var _ = Describe("Rootfs", func() { 11 | Describe("PreloadedRootFS", func() { 12 | It("generates the correct preloaded rootfs URL for the stack", func() { 13 | Ω(models.PreloadedRootFS("bluth-cid64")).Should(Equal("preloaded:bluth-cid64")) 14 | }) 15 | }) 16 | }) 17 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/libtrust/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to libtrust 2 | 3 | Want to hack on libtrust? Awesome! Here are instructions to get you 4 | started. 5 | 6 | libtrust is a part of the [Docker](https://www.docker.com) project, and follows 7 | the same rules and principles. If you're already familiar with the way 8 | Docker does things, you'll feel right at home. 9 | 10 | Otherwise, go read 11 | [Docker's contributions guidelines](https://github.com/docker/docker/blob/master/CONTRIBUTING.md). 12 | 13 | Happy hacking! 14 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/gorilla/websocket/bench_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Gorilla WebSocket Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package websocket 6 | 7 | import ( 8 | "testing" 9 | ) 10 | 11 | func BenchmarkMaskBytes(b *testing.B) { 12 | var key [4]byte 13 | data := make([]byte, 1024) 14 | pos := 0 15 | for i := 0; i < b.N; i++ { 16 | pos = maskBytes(key, pos, data) 17 | } 18 | b.SetBytes(int64(len(data))) 19 | } 20 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/pkg/term/tc_other.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | // +build !linux !cgo 3 | 4 | package term 5 | 6 | import ( 7 | "syscall" 8 | "unsafe" 9 | ) 10 | 11 | func tcget(fd uintptr, p *Termios) syscall.Errno { 12 | _, _, err := syscall.Syscall(syscall.SYS_IOCTL, fd, uintptr(getTermios), uintptr(unsafe.Pointer(p))) 13 | return err 14 | } 15 | 16 | func tcset(fd uintptr, p *Termios) syscall.Errno { 17 | _, _, err := syscall.Syscall(syscall.SYS_IOCTL, fd, setTermios, uintptr(unsafe.Pointer(p))) 18 | return err 19 | } 20 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/codegangsta/cli/helpers_test.go: -------------------------------------------------------------------------------- 1 | package cli_test 2 | 3 | import ( 4 | "reflect" 5 | "testing" 6 | ) 7 | 8 | /* Test Helpers */ 9 | func expect(t *testing.T, a interface{}, b interface{}) { 10 | if a != b { 11 | t.Errorf("Expected %v (type %v) - Got %v (type %v)", b, reflect.TypeOf(b), a, reflect.TypeOf(a)) 12 | } 13 | } 14 | 15 | func refute(t *testing.T, a interface{}, b interface{}) { 16 | if a == b { 17 | t.Errorf("Did not expect %v (type %v) - Got %v (type %v)", b, reflect.TypeOf(b), a, reflect.TypeOf(a)) 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/ginkgo/reporters/reporter.go: -------------------------------------------------------------------------------- 1 | package reporters 2 | 3 | import ( 4 | "github.com/onsi/ginkgo/config" 5 | "github.com/onsi/ginkgo/types" 6 | ) 7 | 8 | type Reporter interface { 9 | SpecSuiteWillBegin(config config.GinkgoConfigType, summary *types.SuiteSummary) 10 | BeforeSuiteDidRun(setupSummary *types.SetupSummary) 11 | SpecWillRun(specSummary *types.SpecSummary) 12 | SpecDidComplete(specSummary *types.SpecSummary) 13 | AfterSuiteDidRun(setupSummary *types.SetupSummary) 14 | SpecSuiteDidEnd(summary *types.SuiteSummary) 15 | } 16 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/gomega/matchers/matcher_tests_suite_test.go: -------------------------------------------------------------------------------- 1 | package matchers_test 2 | 3 | import ( 4 | "testing" 5 | . "github.com/onsi/ginkgo" 6 | . "github.com/onsi/gomega" 7 | ) 8 | 9 | type myStringer struct { 10 | a string 11 | } 12 | 13 | func (s *myStringer) String() string { 14 | return s.a 15 | } 16 | 17 | type StringAlias string 18 | 19 | type myCustomType struct { 20 | s string 21 | n int 22 | f float32 23 | arr []string 24 | } 25 | 26 | func Test(t *testing.T) { 27 | RegisterFailHandler(Fail) 28 | RunSpecs(t, "Gomega") 29 | } 30 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/daemon/graphdriver/btrfs/version.go: -------------------------------------------------------------------------------- 1 | // +build linux,!btrfs_noversion 2 | 3 | package btrfs 4 | 5 | /* 6 | #include 7 | 8 | // because around version 3.16, they did not define lib version yet 9 | int my_btrfs_lib_version() { 10 | #ifdef BTRFS_LIB_VERSION 11 | return BTRFS_LIB_VERSION; 12 | #else 13 | return -1; 14 | #endif 15 | } 16 | */ 17 | import "C" 18 | 19 | func BtrfsBuildVersion() string { 20 | return string(C.BTRFS_BUILD_VERSION) 21 | } 22 | func BtrfsLibVersion() int { 23 | return int(C.BTRFS_LIB_VERSION) 24 | } 25 | -------------------------------------------------------------------------------- /ltc/config/config_helpers/config_helpers_test.go: -------------------------------------------------------------------------------- 1 | package config_helpers_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "github.com/cloudfoundry-incubator/lattice/ltc/config/config_helpers" 8 | ) 9 | 10 | var _ = Describe("ConfigHelpers", func() { 11 | 12 | Describe("ConfigFileLocation", func() { 13 | It("returns the config location for the diego home path", func() { 14 | fileLocation := config_helpers.ConfigFileLocation("/home/chicago") 15 | Expect(fileLocation).To(Equal("/home/chicago/.lattice/config.json")) 16 | }) 17 | }) 18 | }) 19 | -------------------------------------------------------------------------------- /cluster/scripts/install-common: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | mkdir -pv /var/lattice/setup 6 | 7 | apt-get -y update 8 | apt-get -y install curl 9 | 10 | lattice_common_build_path=/tmp/lattice-build/common 11 | 12 | cp -v $lattice_common_build_path/health_check /var/lattice 13 | 14 | cp -v $lattice_common_build_path/LATTICE_VERSION /var/lattice 15 | 16 | ## log rotation ## 17 | cp -v $lattice_common_build_path/system-config/lattice.logrotate.txt /etc/logrotate.d/lattice 18 | echo "## logrotation" >> /etc/crontab 19 | echo "*/5 * * * * root /etc/cron.daily/logrotate" >> /etc/crontab 20 | 21 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/ginkgo/ginkgo/version_command.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "flag" 5 | "fmt" 6 | "github.com/onsi/ginkgo/config" 7 | ) 8 | 9 | func BuildVersionCommand() *Command { 10 | return &Command{ 11 | Name: "version", 12 | FlagSet: flag.NewFlagSet("version", flag.ExitOnError), 13 | UsageCommand: "ginkgo version", 14 | Usage: []string{ 15 | "Print Ginkgo's version", 16 | }, 17 | Command: printVersion, 18 | } 19 | } 20 | 21 | func printVersion([]string, []string) { 22 | fmt.Printf("Ginkgo Version %s\n", config.VERSION) 23 | } 24 | -------------------------------------------------------------------------------- /ltc/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 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar/stat_atim.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux dragonfly openbsd solaris 6 | 7 | package tar 8 | 9 | import ( 10 | "syscall" 11 | "time" 12 | ) 13 | 14 | func statAtime(st *syscall.Stat_t) time.Time { 15 | return time.Unix(st.Atim.Unix()) 16 | } 17 | 18 | func statCtime(st *syscall.Stat_t) time.Time { 19 | return time.Unix(st.Ctim.Unix()) 20 | } 21 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/gomega/matchers/be_true_matcher_test.go: -------------------------------------------------------------------------------- 1 | package matchers_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | . "github.com/onsi/gomega/matchers" 7 | ) 8 | 9 | var _ = Describe("BeTrue", func() { 10 | It("should handle true and false correctly", func() { 11 | Ω(true).Should(BeTrue()) 12 | Ω(false).ShouldNot(BeTrue()) 13 | }) 14 | 15 | It("should only support booleans", func() { 16 | success, err := (&BeTrueMatcher{}).Match("foo") 17 | Ω(success).Should(BeFalse()) 18 | Ω(err).Should(HaveOccurred()) 19 | }) 20 | }) 21 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar/stat_atimespec.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin freebsd netbsd 6 | 7 | package tar 8 | 9 | import ( 10 | "syscall" 11 | "time" 12 | ) 13 | 14 | func statAtime(st *syscall.Stat_t) time.Time { 15 | return time.Unix(st.Atimespec.Unix()) 16 | } 17 | 18 | func statCtime(st *syscall.Stat_t) time.Time { 19 | return time.Unix(st.Ctimespec.Unix()) 20 | } 21 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/gomega/matchers/be_false_matcher_test.go: -------------------------------------------------------------------------------- 1 | package matchers_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | . "github.com/onsi/gomega/matchers" 7 | ) 8 | 9 | var _ = Describe("BeFalse", func() { 10 | It("should handle true and false correctly", func() { 11 | Ω(true).ShouldNot(BeFalse()) 12 | Ω(false).Should(BeFalse()) 13 | }) 14 | 15 | It("should only support booleans", func() { 16 | success, err := (&BeFalseMatcher{}).Match("foo") 17 | Ω(success).Should(BeFalse()) 18 | Ω(err).Should(HaveOccurred()) 19 | }) 20 | }) 21 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/gomega/matchers/be_nil_matcher.go: -------------------------------------------------------------------------------- 1 | package matchers 2 | 3 | import "github.com/onsi/gomega/format" 4 | 5 | type BeNilMatcher struct { 6 | } 7 | 8 | func (matcher *BeNilMatcher) Match(actual interface{}) (success bool, err error) { 9 | return isNil(actual), nil 10 | } 11 | 12 | func (matcher *BeNilMatcher) FailureMessage(actual interface{}) (message string) { 13 | return format.Message(actual, "to be nil") 14 | } 15 | 16 | func (matcher *BeNilMatcher) NegatedFailureMessage(actual interface{}) (message string) { 17 | return format.Message(actual, "not to be nil") 18 | } 19 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/cloudfoundry-incubator/runtime-schema/models/taskstate_string.go: -------------------------------------------------------------------------------- 1 | // generated by stringer -type=TaskState; DO NOT EDIT 2 | 3 | package models 4 | 5 | import "fmt" 6 | 7 | const _TaskState_name = "TaskStateInvalidTaskStatePendingTaskStateRunningTaskStateCompletedTaskStateResolving" 8 | 9 | var _TaskState_index = [...]uint8{0, 16, 32, 48, 66, 84} 10 | 11 | func (i TaskState) String() string { 12 | if i < 0 || i+1 >= TaskState(len(_TaskState_index)) { 13 | return fmt.Sprintf("TaskState(%d)", i) 14 | } 15 | return _TaskState_name[_TaskState_index[i]:_TaskState_index[i+1]] 16 | } 17 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/opts/ip.go: -------------------------------------------------------------------------------- 1 | package opts 2 | 3 | import ( 4 | "fmt" 5 | "net" 6 | ) 7 | 8 | type IpOpt struct { 9 | *net.IP 10 | } 11 | 12 | func NewIpOpt(ref *net.IP, defaultVal string) *IpOpt { 13 | o := &IpOpt{ 14 | IP: ref, 15 | } 16 | o.Set(defaultVal) 17 | return o 18 | } 19 | 20 | func (o *IpOpt) Set(val string) error { 21 | ip := net.ParseIP(val) 22 | if ip == nil { 23 | return fmt.Errorf("%s is not an ip address", val) 24 | } 25 | (*o.IP) = net.ParseIP(val) 26 | return nil 27 | } 28 | 29 | func (o *IpOpt) String() string { 30 | return (*o.IP).String() 31 | } 32 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/gomega/gexec/gexec_suite_test.go: -------------------------------------------------------------------------------- 1 | package gexec_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | "github.com/onsi/gomega/gexec" 7 | 8 | "testing" 9 | ) 10 | 11 | var fireflyPath string 12 | 13 | func TestGexec(t *testing.T) { 14 | BeforeSuite(func() { 15 | var err error 16 | fireflyPath, err = gexec.Build("./_fixture/firefly") 17 | Ω(err).ShouldNot(HaveOccurred()) 18 | }) 19 | 20 | AfterSuite(func() { 21 | gexec.CleanupBuildArtifacts() 22 | }) 23 | 24 | RegisterFailHandler(Fail) 25 | RunSpecs(t, "Gexec Suite") 26 | } 27 | -------------------------------------------------------------------------------- /ltc/exit_handler/fake_exit_handler/fake_exit_handler.go: -------------------------------------------------------------------------------- 1 | package fake_exit_handler 2 | 3 | import "sync" 4 | 5 | type FakeExitHandler struct { 6 | sync.RWMutex 7 | exitFunc func() 8 | ExitCalledWith []int 9 | } 10 | 11 | func (f *FakeExitHandler) OnExit(exitHandler func()) { 12 | f.Lock() 13 | defer f.Unlock() 14 | f.exitFunc = exitHandler 15 | } 16 | 17 | func (f *FakeExitHandler) Run() { 18 | 19 | } 20 | 21 | func (f *FakeExitHandler) Exit(code int) { 22 | f.Lock() 23 | defer f.Unlock() 24 | f.ExitCalledWith = append(f.ExitCalledWith, code) 25 | if f.exitFunc != nil { 26 | f.exitFunc() 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /cluster/brain/upstart/consul.conf: -------------------------------------------------------------------------------- 1 | #!upstart 2 | 3 | start on started bootstrap 4 | stop on shutdown 5 | respawn 6 | 7 | script 8 | echo "UPSTART: Trying to start consul - `date --rfc-3339=ns`" 9 | 10 | echo 'nameserver 127.0.0.1' > /etc/resolvconf/resolv.conf.d/head 11 | resolvconf -u 12 | consul agent \ 13 | -server \ 14 | -bootstrap-expect 1 \ 15 | -data-dir /tmp/consul \ 16 | -config-dir /var/lattice/config/consul-services \ 17 | -config-file /var/lattice/config/consul.json \ 18 | >> /var/lattice/log/consul-service.log 2>&1 19 | end script 20 | 21 | post-stop exec sleep 5 22 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/nat/sort.go: -------------------------------------------------------------------------------- 1 | package nat 2 | 3 | import "sort" 4 | 5 | type portSorter struct { 6 | ports []Port 7 | by func(i, j Port) bool 8 | } 9 | 10 | func (s *portSorter) Len() int { 11 | return len(s.ports) 12 | } 13 | 14 | func (s *portSorter) Swap(i, j int) { 15 | s.ports[i], s.ports[j] = s.ports[j], s.ports[i] 16 | } 17 | 18 | func (s *portSorter) Less(i, j int) bool { 19 | ip := s.ports[i] 20 | jp := s.ports[j] 21 | 22 | return s.by(ip, jp) 23 | } 24 | 25 | func Sort(ports []Port, predicate func(i, j Port) bool) { 26 | s := &portSorter{ports, predicate} 27 | sort.Sort(s) 28 | } 29 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/pkg/system/mknod.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package system 4 | 5 | import ( 6 | "syscall" 7 | ) 8 | 9 | func Mknod(path string, mode uint32, dev int) error { 10 | return syscall.Mknod(path, mode, dev) 11 | } 12 | 13 | // Linux device nodes are a bit weird due to backwards compat with 16 bit device nodes. 14 | // They are, from low to high: the lower 8 bits of the minor, then 12 bits of the major, 15 | // then the top 12 bits of the minor 16 | func Mkdev(major int64, minor int64) uint32 { 17 | return uint32(((minor & 0xfff00) << 12) | ((major & 0xfff) << 8) | (minor & 0xff)) 18 | } 19 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/gorilla/mux/bench_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Gorilla 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 mux 6 | 7 | import ( 8 | "net/http" 9 | "testing" 10 | ) 11 | 12 | func BenchmarkMux(b *testing.B) { 13 | router := new(Router) 14 | handler := func(w http.ResponseWriter, r *http.Request) {} 15 | router.HandleFunc("/v1/{v1}", handler) 16 | 17 | request, _ := http.NewRequest("GET", "/v1/anything", nil) 18 | for i := 0; i < b.N; i++ { 19 | router.ServeHTTP(nil, request) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/ginkgo/internal/remote/fake_output_interceptor_test.go: -------------------------------------------------------------------------------- 1 | package remote_test 2 | 3 | type fakeOutputInterceptor struct { 4 | DidStartInterceptingOutput bool 5 | DidStopInterceptingOutput bool 6 | InterceptedOutput string 7 | } 8 | 9 | func (interceptor *fakeOutputInterceptor) StartInterceptingOutput() error { 10 | interceptor.DidStartInterceptingOutput = true 11 | return nil 12 | } 13 | 14 | func (interceptor *fakeOutputInterceptor) StopInterceptingAndReturnOutput() (string, error) { 15 | interceptor.DidStopInterceptingOutput = true 16 | return interceptor.InterceptedOutput, nil 17 | } 18 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/papertrail/papertrail_test.go: -------------------------------------------------------------------------------- 1 | package logrus_papertrail 2 | 3 | import ( 4 | "fmt" 5 | "testing" 6 | 7 | "github.com/Sirupsen/logrus" 8 | "github.com/stvp/go-udp-testing" 9 | ) 10 | 11 | func TestWritingToUDP(t *testing.T) { 12 | port := 16661 13 | udp.SetAddr(fmt.Sprintf(":%d", port)) 14 | 15 | hook, err := NewPapertrailHook("localhost", port, "test") 16 | if err != nil { 17 | t.Errorf("Unable to connect to local UDP server.") 18 | } 19 | 20 | log := logrus.New() 21 | log.Hooks.Add(hook) 22 | 23 | udp.ShouldReceive(t, "foo", func() { 24 | log.Info("foo") 25 | }) 26 | } 27 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/cloudfoundry-incubator/receptor/doc/README.md: -------------------------------------------------------------------------------- 1 | # Diego API Docs 2 | 3 | **The Diego API is still work-in-progress and subject to change.** 4 | 5 | Here's an outline: 6 | 7 | - [API Overview](overview.md) 8 | - [Understanding Tasks](tasks.md) 9 | - [Understanding Long Running Processes (LRPs)](lrps.md) 10 | - [Container Runtime Environment](environment.md) 11 | - [Available Actions](actions.md) 12 | - API Reference 13 | - [Authorization](auth.md) 14 | - [Tasks](api_tasks.md) 15 | - [LRPs](api_lrps.md) 16 | - [Cells](api_cells.md) 17 | - [Domains](api_domains.md) 18 | - [Events] (events.md) 19 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/utils/timeoutconn.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | import ( 4 | "net" 5 | "time" 6 | ) 7 | 8 | func NewTimeoutConn(conn net.Conn, timeout time.Duration) net.Conn { 9 | return &TimeoutConn{conn, timeout} 10 | } 11 | 12 | // A net.Conn that sets a deadline for every Read or Write operation 13 | type TimeoutConn struct { 14 | net.Conn 15 | timeout time.Duration 16 | } 17 | 18 | func (c *TimeoutConn) Read(b []byte) (int, error) { 19 | if c.timeout > 0 { 20 | err := c.Conn.SetReadDeadline(time.Now().Add(c.timeout)) 21 | if err != nil { 22 | return 0, err 23 | } 24 | } 25 | return c.Conn.Read(b) 26 | } 27 | -------------------------------------------------------------------------------- /ltc/terminal/password_reader/password_reader.go: -------------------------------------------------------------------------------- 1 | package password_reader 2 | 3 | import ( 4 | "io" 5 | 6 | "github.com/cloudfoundry-incubator/lattice/ltc/exit_handler" 7 | ) 8 | 9 | //go:generate counterfeiter -o fake_password_reader/fake_password_reader.go . PasswordReader 10 | type PasswordReader interface { 11 | PromptForPassword(promptText string, args ...interface{}) string 12 | } 13 | 14 | type passwordReader struct { 15 | io.Reader 16 | exitHandler exit_handler.ExitHandler 17 | } 18 | 19 | func NewPasswordReader(exitHandler exit_handler.ExitHandler) *passwordReader { 20 | return &passwordReader{ 21 | exitHandler: exitHandler, 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /cluster/cell/upstart/consul.conf: -------------------------------------------------------------------------------- 1 | #!upstart 2 | 3 | start on started bootstrap 4 | stop on shutdown 5 | respawn 6 | 7 | pre-start script 8 | echo 'nameserver 127.0.0.1' > /etc/resolvconf/resolv.conf.d/head 9 | resolvconf -u 10 | end script 11 | 12 | script 13 | echo "UPSTART: Trying to start consul - `date --rfc-3339=ns`" 14 | export $(cat /var/lattice/setup/lattice-environment) 15 | 16 | consul agent \ 17 | -config-file /var/lattice/config/consul.json \ 18 | -data-dir /tmp/consul \ 19 | -join $CONSUL_SERVER_IP \ 20 | >> /var/lattice/log/consul-service.log 2>&1 21 | end script 22 | 23 | post-stop exec sleep 5 24 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/cloudfoundry-incubator/receptor/serialization/cells.go: -------------------------------------------------------------------------------- 1 | package serialization 2 | 3 | import ( 4 | "github.com/cloudfoundry-incubator/receptor" 5 | "github.com/cloudfoundry-incubator/runtime-schema/models" 6 | ) 7 | 8 | func CellPresenceToCellResponse(cellPresence models.CellPresence) receptor.CellResponse { 9 | return receptor.CellResponse{ 10 | CellID: cellPresence.CellID, 11 | Zone: cellPresence.Zone, 12 | Capacity: receptor.CellCapacity{ 13 | MemoryMB: cellPresence.Capacity.MemoryMB, 14 | DiskMB: cellPresence.Capacity.DiskMB, 15 | Containers: cellPresence.Capacity.Containers, 16 | }, 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/pkg/system/lstat_test.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import ( 4 | "os" 5 | "testing" 6 | ) 7 | 8 | func TestLstat(t *testing.T) { 9 | file, invalid, _, dir := prepareFiles(t) 10 | defer os.RemoveAll(dir) 11 | 12 | statFile, err := Lstat(file) 13 | if err != nil { 14 | t.Fatal(err) 15 | } 16 | if statFile == nil { 17 | t.Fatal("returned empty stat for existing file") 18 | } 19 | 20 | statInvalid, err := Lstat(invalid) 21 | if err == nil { 22 | t.Fatal("did not return error for non-existing file") 23 | } 24 | if statInvalid != nil { 25 | t.Fatal("returned non-nil stat for non-existing file") 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ltc/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 | 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 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/pivotal-golang/lager/models.go: -------------------------------------------------------------------------------- 1 | package lager 2 | 3 | import "encoding/json" 4 | 5 | type LogLevel int 6 | 7 | const ( 8 | DEBUG LogLevel = iota 9 | INFO 10 | ERROR 11 | FATAL 12 | ) 13 | 14 | type Data map[string]interface{} 15 | 16 | type LogFormat struct { 17 | Timestamp string `json:"timestamp"` 18 | Source string `json:"source"` 19 | Message string `json:"message"` 20 | LogLevel LogLevel `json:"log_level"` 21 | Data Data `json:"data"` 22 | } 23 | 24 | func (log LogFormat) ToJSON() []byte { 25 | content, err := json.Marshal(log) 26 | if err != nil { 27 | panic(err) 28 | } 29 | return content 30 | } 31 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/pkg/tarsum/testdata/511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158/json: -------------------------------------------------------------------------------- 1 | {"id":"511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158","comment":"Imported from -","created":"2013-06-13T14:03:50.821769-07:00","container_config":{"Hostname":"","Domainname":"","User":"","Memory":0,"MemorySwap":0,"CpuShares":0,"AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"PortSpecs":null,"ExposedPorts":null,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":null,"Cmd":null,"Image":"","Volumes":null,"WorkingDir":"","Entrypoint":null,"NetworkDisabled":false,"OnBuild":null},"docker_version":"0.4.0","architecture":"x86_64","Size":0} -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/gizak/termui/point.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 Zack Guo . All rights reserved. 2 | // Use of this source code is governed by a MIT license that can 3 | // be found in the LICENSE file. 4 | 5 | package termui 6 | 7 | // Point stands for a single cell in terminal. 8 | type Point struct { 9 | Ch rune 10 | Bg Attribute 11 | Fg Attribute 12 | X int 13 | Y int 14 | } 15 | 16 | func newPoint(c rune, x, y int) (p Point) { 17 | p.Ch = c 18 | p.X = x 19 | p.Y = y 20 | return 21 | } 22 | 23 | func newPointWithAttrs(c rune, x, y int, fg, bg Attribute) Point { 24 | p := newPoint(c, x, y) 25 | p.Bg = bg 26 | p.Fg = fg 27 | return p 28 | } 29 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/cloudfoundry-incubator/receptor/cmd/receptor/start_test.go: -------------------------------------------------------------------------------- 1 | package main_test 2 | 3 | import ( 4 | "github.com/tedsuo/ifrit/ginkgomon" 5 | 6 | . "github.com/onsi/ginkgo" 7 | . "github.com/onsi/gomega" 8 | ) 9 | 10 | var _ = Describe("Starting Receptor", func() { 11 | Context("when etcd is down", func() { 12 | BeforeEach(func() { 13 | etcdRunner.Stop() 14 | receptorProcess = ginkgomon.Invoke(receptorRunner) 15 | }) 16 | 17 | AfterEach(func() { 18 | ginkgomon.Kill(receptorProcess) 19 | etcdRunner.Start() 20 | }) 21 | 22 | It("starts", func() { 23 | Eventually(receptorProcess.Ready()).Should(BeClosed()) 24 | }) 25 | }) 26 | }) 27 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/gorilla/websocket/examples/autobahn/fuzzingclient.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "options": {"failByDrop": false}, 4 | "outdir": "./reports/clients", 5 | "servers": [ 6 | {"agent": "ReadAllWriteMessage", "url": "ws://localhost:9000/m", "options": {"version": 18}}, 7 | {"agent": "ReadAllWrite", "url": "ws://localhost:9000/r", "options": {"version": 18}}, 8 | {"agent": "CopyFull", "url": "ws://localhost:9000/f", "options": {"version": 18}}, 9 | {"agent": "CopyWriterOnly", "url": "ws://localhost:9000/c", "options": {"version": 18}} 10 | ], 11 | "cases": ["*"], 12 | "exclude-cases": [], 13 | "exclude-agent-cases": {} 14 | } 15 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/ginkgo/ginkgo/watch/delta.go: -------------------------------------------------------------------------------- 1 | package watch 2 | 3 | import "sort" 4 | 5 | type Delta struct { 6 | ModifiedPackages []string 7 | 8 | NewSuites []*Suite 9 | RemovedSuites []*Suite 10 | modifiedSuites []*Suite 11 | } 12 | 13 | type DescendingByDelta []*Suite 14 | 15 | func (a DescendingByDelta) Len() int { return len(a) } 16 | func (a DescendingByDelta) Swap(i, j int) { a[i], a[j] = a[j], a[i] } 17 | func (a DescendingByDelta) Less(i, j int) bool { return a[i].Delta() > a[j].Delta() } 18 | 19 | func (d Delta) ModifiedSuites() []*Suite { 20 | sort.Sort(DescendingByDelta(d.modifiedSuites)) 21 | return d.modifiedSuites 22 | } 23 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/gomega/types/types.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | type GomegaFailHandler func(message string, callerSkip ...int) 4 | 5 | //A simple *testing.T interface wrapper 6 | type GomegaTestingT interface { 7 | Errorf(format string, args ...interface{}) 8 | } 9 | 10 | //All Gomega matchers must implement the GomegaMatcher interface 11 | // 12 | //For details on writing custom matchers, check out: http://onsi.github.io/gomega/#adding_your_own_matchers 13 | type GomegaMatcher interface { 14 | Match(actual interface{}) (success bool, err error) 15 | FailureMessage(actual interface{}) (message string) 16 | NegatedFailureMessage(actual interface{}) (message string) 17 | } 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | Vagrantfile-e 2 | .vagrant 3 | .idea 4 | *.iml 5 | bin/linux_amd64/* 6 | lattice.tgz 7 | ltc.tar.gz 8 | .system-domain 9 | .lattice-environment 10 | *.box 11 | *.iso 12 | 13 | ltc/ltc 14 | tee2metron/tee2metron 15 | tee2metron/test_helpers/chatty_process/chatty_process 16 | *.test 17 | *.coverprofile 18 | 19 | terraform.tfvars 20 | terraform.tfstate 21 | terraform.tfstate.backup 22 | .lattice.tf.swp 23 | .terraform 24 | .terraform.tfstate.swp 25 | 26 | *playground 27 | lattice.tf 28 | lattice.aws.tf 29 | lattice.digitalocean.tf 30 | lattice.gce.tf 31 | !terraform/aws/example/lattice.aws.tf 32 | !terraform/digitalocean/example/lattice.digitalocean.tf 33 | !terraform/gce/example/lattice.gce.tf 34 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/mattn/go-runewidth/README.mkd: -------------------------------------------------------------------------------- 1 | go-runewidth 2 | ============ 3 | 4 | [![Build Status](https://travis-ci.org/mattn/go-runewidth.png?branch=master)](https://travis-ci.org/mattn/go-runewidth) 5 | [![Coverage Status](https://coveralls.io/repos/mattn/go-runewidth/badge.png?branch=HEAD)](https://coveralls.io/r/mattn/go-runewidth?branch=HEAD) 6 | 7 | Provides functions to get fixed width of the character or string. 8 | 9 | Usage 10 | ----- 11 | 12 | ```go 13 | runewidth.StringWidth("つのだ☆HIRO") == 12 14 | ``` 15 | 16 | 17 | Author 18 | ------ 19 | 20 | Yasuhiro Matsumoto 21 | 22 | License 23 | ------- 24 | 25 | under the MIT License: http://mattn.mit-license.org/2013 26 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/ginkgo/types/synchronization.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | import ( 4 | "encoding/json" 5 | ) 6 | 7 | type RemoteBeforeSuiteState int 8 | 9 | const ( 10 | RemoteBeforeSuiteStateInvalid RemoteBeforeSuiteState = iota 11 | 12 | RemoteBeforeSuiteStatePending 13 | RemoteBeforeSuiteStatePassed 14 | RemoteBeforeSuiteStateFailed 15 | RemoteBeforeSuiteStateDisappeared 16 | ) 17 | 18 | type RemoteBeforeSuiteData struct { 19 | Data []byte 20 | State RemoteBeforeSuiteState 21 | } 22 | 23 | func (r RemoteBeforeSuiteData) ToJSON() []byte { 24 | data, _ := json.Marshal(r) 25 | return data 26 | } 27 | 28 | type RemoteAfterSuiteData struct { 29 | CanRun bool 30 | } 31 | -------------------------------------------------------------------------------- /cluster/brain/config/metron.json: -------------------------------------------------------------------------------- 1 | { 2 | "EtcdUrls": ["http://127.0.0.1:4001"], 3 | "EtcdMaxConcurrentRequests": 10, 4 | "SharedSecret": "loggregator-secret", 5 | "LegacyIncomingMessagesPort": 4456, 6 | "DropsondeIncomingMessagesPort": 3457, 7 | "Index": 0, 8 | "Job": "cell_z1", 9 | "VarzUser": "", 10 | "VarzPass": "", 11 | "VarzPort": 0, 12 | "NatsHosts": ["127.0.0.1"], 13 | "NatsPort": 4222, 14 | "NatsUser": "nats", 15 | "NatsPass": "nats", 16 | "EtcdQueryIntervalMilliseconds": 5000, 17 | "Zone": "z1", 18 | "LoggregatorLegacyPort": 3456, 19 | "LoggregatorDropsondePort": 3458, 20 | "CollectorRegistrarIntervalMilliseconds": 60000 21 | } 22 | -------------------------------------------------------------------------------- /cluster/cell/upstart/rep.conf: -------------------------------------------------------------------------------- 1 | #!upstart 2 | 3 | start on started consul 4 | stop on shutdown 5 | respawn 6 | 7 | script 8 | echo "UPSTART: Trying to start rep - `date --rfc-3339=ns`" 9 | 10 | export $(cat /var/lattice/setup/lattice-environment) 11 | 12 | tee2metron -dropsondeDestination=127.0.0.1:3457 -sourceInstance=$LATTICE_CELL_ID \ 13 | rep \ 14 | -etcdCluster http://etcd.service.dc1.consul:4001 \ 15 | -consulCluster="http://127.0.0.1:8500" \ 16 | -executorURL=http://127.0.0.1:1700 \ 17 | -cellID=$LATTICE_CELL_ID \ 18 | -rootFSProvider=docker \ 19 | >> /var/lattice/log/rep-service.log 2>&1 20 | 21 | end script 22 | 23 | post-stop exec sleep 5 24 | -------------------------------------------------------------------------------- /cluster/brain/upstart/trafficcontroller.conf: -------------------------------------------------------------------------------- 1 | #!upstart 2 | 3 | start on started gnatsd 4 | stop on shutdown 5 | respawn 6 | 7 | pre-start script 8 | export $(cat /var/lattice/setup/lattice-environment) 9 | sed "s/SYSTEMDOMAIN_PLACEHOLDER/$SYSTEM_DOMAIN/" /var/lattice/setup/trafficcontroller-template.json > /var/lattice/config/trafficcontroller.json 10 | end script 11 | 12 | script 13 | echo "UPSTART: Trying to start trafficcontroller - `date --rfc-3339=ns`" 14 | trafficcontroller \ 15 | --config /var/lattice/config/trafficcontroller.json \ 16 | --disableAccessControl \ 17 | >> /var/lattice/log/trafficcontroller-service.log 2>&1 18 | end script 19 | 20 | post-stop exec sleep 5 21 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/gomega/internal/fakematcher/fake_matcher.go: -------------------------------------------------------------------------------- 1 | package fakematcher 2 | 3 | import "fmt" 4 | 5 | type FakeMatcher struct { 6 | ReceivedActual interface{} 7 | MatchesToReturn bool 8 | ErrToReturn error 9 | } 10 | 11 | func (matcher *FakeMatcher) Match(actual interface{}) (bool, error) { 12 | matcher.ReceivedActual = actual 13 | 14 | return matcher.MatchesToReturn, matcher.ErrToReturn 15 | } 16 | 17 | func (matcher *FakeMatcher) FailureMessage(actual interface{}) string { 18 | return fmt.Sprintf("positive: %v", actual) 19 | } 20 | 21 | func (matcher *FakeMatcher) NegatedFailureMessage(actual interface{}) string { 22 | return fmt.Sprintf("negative: %v", actual) 23 | } 24 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/nu7hatch/gouuid/README.md: -------------------------------------------------------------------------------- 1 | # Pure Go UUID implementation 2 | 3 | This package provides immutable UUID structs and the functions 4 | NewV3, NewV4, NewV5 and Parse() for generating versions 3, 4 5 | and 5 UUIDs as specified in [RFC 4122](http://www.ietf.org/rfc/rfc4122.txt). 6 | 7 | ## Installation 8 | 9 | Use the `go` tool: 10 | 11 | $ go get github.com/nu7hatch/gouuid 12 | 13 | ## Usage 14 | 15 | See [documentation and examples](http://godoc.org/github.com/nu7hatch/gouuid) 16 | for more information. 17 | 18 | ## Copyright 19 | 20 | Copyright (C) 2011 by Krzysztof Kowalik . See [COPYING](https://github.com/nu7hatch/gouuid/tree/master/COPYING) 21 | file for details. 22 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/syslog/syslog_test.go: -------------------------------------------------------------------------------- 1 | package logrus_syslog 2 | 3 | import ( 4 | "github.com/Sirupsen/logrus" 5 | "log/syslog" 6 | "testing" 7 | ) 8 | 9 | func TestLocalhostAddAndPrint(t *testing.T) { 10 | log := logrus.New() 11 | hook, err := NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "") 12 | 13 | if err != nil { 14 | t.Errorf("Unable to connect to local syslog.") 15 | } 16 | 17 | log.Hooks.Add(hook) 18 | 19 | for _, level := range hook.Levels() { 20 | if len(log.Hooks[level]) != 1 { 21 | t.Errorf("SyslogHook was not added. The length of log.Hooks[%v]: %v", level, len(log.Hooks[level])) 22 | } 23 | } 24 | 25 | log.Info("Congratulations!") 26 | } 27 | -------------------------------------------------------------------------------- /ltc/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,!appengine 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 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/libtrust/util_test.go: -------------------------------------------------------------------------------- 1 | package libtrust 2 | 3 | import ( 4 | "encoding/pem" 5 | "reflect" 6 | "testing" 7 | ) 8 | 9 | func TestAddPEMHeadersToKey(t *testing.T) { 10 | pk := &rsaPublicKey{nil, map[string]interface{}{}} 11 | blk := &pem.Block{Headers: map[string]string{"hosts": "localhost,127.0.0.1"}} 12 | addPEMHeadersToKey(blk, pk) 13 | 14 | val := pk.GetExtendedField("hosts") 15 | hosts, ok := val.([]string) 16 | if !ok { 17 | t.Fatalf("hosts type(%v), expected []string", reflect.TypeOf(val)) 18 | } 19 | expected := []string{"localhost", "127.0.0.1"} 20 | if !reflect.DeepEqual(hosts, expected) { 21 | t.Errorf("hosts(%v), expected %v", hosts, expected) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/Sirupsen/logrus/json_formatter.go: -------------------------------------------------------------------------------- 1 | package logrus 2 | 3 | import ( 4 | "encoding/json" 5 | "fmt" 6 | "time" 7 | ) 8 | 9 | type JSONFormatter struct{} 10 | 11 | func (f *JSONFormatter) Format(entry *Entry) ([]byte, error) { 12 | data := make(Fields, len(entry.Data)+3) 13 | for k, v := range entry.Data { 14 | data[k] = v 15 | } 16 | prefixFieldClashes(data) 17 | data["time"] = entry.Time.Format(time.RFC3339) 18 | data["msg"] = entry.Message 19 | data["level"] = entry.Level.String() 20 | 21 | serialized, err := json.Marshal(data) 22 | if err != nil { 23 | return nil, fmt.Errorf("Failed to marshal fields to JSON, %v", err) 24 | } 25 | return append(serialized, '\n'), nil 26 | } 27 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/nu7hatch/gouuid/example_test.go: -------------------------------------------------------------------------------- 1 | package uuid_test 2 | 3 | import ( 4 | "fmt" 5 | "github.com/nu7hatch/gouuid" 6 | ) 7 | 8 | func ExampleNewV4() { 9 | u4, err := uuid.NewV4() 10 | if err != nil { 11 | fmt.Println("error:", err) 12 | return 13 | } 14 | fmt.Println(u4) 15 | } 16 | 17 | func ExampleNewV5() { 18 | u5, err := uuid.NewV5(uuid.NamespaceURL, []byte("nu7hat.ch")) 19 | if err != nil { 20 | fmt.Println("error:", err) 21 | return 22 | } 23 | fmt.Println(u5) 24 | } 25 | 26 | func ExampleParseHex() { 27 | u, err := uuid.ParseHex("6ba7b810-9dad-11d1-80b4-00c04fd430c8") 28 | if err != nil { 29 | fmt.Println("error:", err) 30 | return 31 | } 32 | fmt.Println(u) 33 | } 34 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/ginkgo/ginkgo/testrunner/run_result.go: -------------------------------------------------------------------------------- 1 | package testrunner 2 | 3 | type RunResult struct { 4 | Passed bool 5 | HasProgrammaticFocus bool 6 | } 7 | 8 | func PassingRunResult() RunResult { 9 | return RunResult{ 10 | Passed: true, 11 | HasProgrammaticFocus: false, 12 | } 13 | } 14 | 15 | func FailingRunResult() RunResult { 16 | return RunResult{ 17 | Passed: false, 18 | HasProgrammaticFocus: false, 19 | } 20 | } 21 | 22 | func (r RunResult) Merge(o RunResult) RunResult { 23 | return RunResult{ 24 | Passed: r.Passed && o.Passed, 25 | HasProgrammaticFocus: r.HasProgrammaticFocus || o.HasProgrammaticFocus, 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /cluster/brain/upstart/route-emitter.conf: -------------------------------------------------------------------------------- 1 | #!upstart 2 | 3 | start on started gnatsd 4 | stop on shutdown 5 | respawn 6 | 7 | script 8 | echo "UPSTART: Trying to start route-emitter - `date --rfc-3339=ns`" 9 | export $(cat /var/lattice/setup/lattice-environment) 10 | 11 | route-emitter \ 12 | -natsAddresses="127.0.0.1:4222" \ 13 | -natsUsername="nats" \ 14 | -natsPassword="nats" \ 15 | -consulCluster="http://127.0.0.1:8500" \ 16 | -diegoAPIURL="http://$LATTICE_USERNAME:$LATTICE_PASSWORD@127.0.0.1:8888" \ 17 | -debugAddr=0.0.0.0:17009 \ 18 | -syncInterval="60s" \ 19 | >> /var/lattice/log/route-emitter-service.log 2>&1 20 | end script 21 | 22 | post-stop exec sleep 5 23 | -------------------------------------------------------------------------------- /cluster/cell/config/metron.json: -------------------------------------------------------------------------------- 1 | { 2 | "EtcdUrls": ["http://etcd.service.dc1.consul:4001"], 3 | "EtcdMaxConcurrentRequests": 10, 4 | "SharedSecret": "loggregator-secret", 5 | "LegacyIncomingMessagesPort": 4456, 6 | "DropsondeIncomingMessagesPort": 3457, 7 | "Index": 0, 8 | "Job": "cell_z1", 9 | "VarzUser": "", 10 | "VarzPass": "", 11 | "VarzPort": 0, 12 | "NatsHosts": ["nats.service.dc1.consul"], 13 | "NatsPort": 4222, 14 | "NatsUser": "nats", 15 | "NatsPass": "nats", 16 | "EtcdQueryIntervalMilliseconds": 5000, 17 | "Zone": "z1", 18 | "LoggregatorLegacyPort": 3456, 19 | "LoggregatorDropsondePort": 3458, 20 | "CollectorRegistrarIntervalMilliseconds": 60000 21 | } 22 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/codegangsta/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) { 14 | // println("Greetings") 15 | // } 16 | // 17 | // app.Run(os.Args) 18 | // } 19 | package cli 20 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/cloudfoundry-incubator/receptor/doc/api_domains.md: -------------------------------------------------------------------------------- 1 | ## Domains 2 | 3 | As described [here](lrps.md#freshness), Diego must be told when desired state is up to date before it wil take potentially destructive actions. 4 | 5 | ### Upserting a domain 6 | 7 | To mark a domain as fresh for N seconds (ttl): 8 | 9 | ``` 10 | PUT /v1/domains/:domain 11 | Cache-Control: max-age=N 12 | ``` 13 | 14 | You must repeat the PUT before the `ttl` expires. To make the domain never expire, do not include the Cache-Control header. 15 | 16 | ### Fetching all "fresh" Domains 17 | 18 | To fetch all fresh domains: 19 | 20 | ``` 21 | GET /v1/domains 22 | ``` 23 | 24 | This returns an array of strings. 25 | 26 | [back](README.md) -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/gomega/matchers/be_nil_matcher_test.go: -------------------------------------------------------------------------------- 1 | package matchers_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | ) 7 | 8 | var _ = Describe("BeNil", func() { 9 | It("should succeed when passed nil", func() { 10 | Ω(nil).Should(BeNil()) 11 | }) 12 | 13 | It("should succeed when passed a typed nil", func() { 14 | var a []int 15 | Ω(a).Should(BeNil()) 16 | }) 17 | 18 | It("should succeed when passing nil pointer", func() { 19 | var f *struct{} 20 | Ω(f).Should(BeNil()) 21 | }) 22 | 23 | It("should not succeed when not passed nil", func() { 24 | Ω(0).ShouldNot(BeNil()) 25 | Ω(false).ShouldNot(BeNil()) 26 | Ω("").ShouldNot(BeNil()) 27 | }) 28 | }) 29 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/bmizerany/pat/example/hello.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "io" 5 | "log" 6 | "net/http" 7 | 8 | "github.com/bmizerany/pat" 9 | ) 10 | 11 | // hello world, the web server 12 | func HelloServer(w http.ResponseWriter, req *http.Request) { 13 | io.WriteString(w, "hello, "+req.URL.Query().Get(":name")+"!\n") 14 | } 15 | 16 | func main() { 17 | m := pat.New() 18 | m.Get("/hello/:name", http.HandlerFunc(HelloServer)) 19 | 20 | // Register this pat with the default serve mux so that other packages 21 | // may also be exported. (i.e. /debug/pprof/*) 22 | http.Handle("/", m) 23 | err := http.ListenAndServe(":12345", nil) 24 | if err != nil { 25 | log.Fatal("ListenAndServe: ", err) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ltc/app_examiner/noaa_consumer.go: -------------------------------------------------------------------------------- 1 | package app_examiner 2 | 3 | import ( 4 | "github.com/cloudfoundry/noaa" 5 | "github.com/cloudfoundry/noaa/events" 6 | ) 7 | 8 | //go:generate counterfeiter -o fake_noaa_consumer/fake_noaa_consumer.go . NoaaConsumer 9 | type NoaaConsumer interface { 10 | GetContainerMetrics(appGuid, token string) ([]*events.ContainerMetric, error) 11 | } 12 | 13 | type noaaConsumer struct { 14 | consumer *noaa.Consumer 15 | } 16 | 17 | func NewNoaaConsumer(consumer *noaa.Consumer) NoaaConsumer { 18 | return &noaaConsumer{ 19 | consumer: consumer, 20 | } 21 | } 22 | 23 | func (n *noaaConsumer) GetContainerMetrics(appGuid, token string) ([]*events.ContainerMetric, error) { 24 | return n.consumer.ContainerMetrics(appGuid, token) 25 | } 26 | -------------------------------------------------------------------------------- /ltc/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 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/ginkgo/internal/suite/suite_suite_test.go: -------------------------------------------------------------------------------- 1 | package suite_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func Test(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Suite") 13 | } 14 | 15 | var numBeforeSuiteRuns = 0 16 | var numAfterSuiteRuns = 0 17 | 18 | var _ = BeforeSuite(func() { 19 | numBeforeSuiteRuns++ 20 | }) 21 | 22 | var _ = AfterSuite(func() { 23 | numAfterSuiteRuns++ 24 | Ω(numBeforeSuiteRuns).Should(Equal(1)) 25 | Ω(numAfterSuiteRuns).Should(Equal(1)) 26 | }) 27 | 28 | //Fakes 29 | type fakeTestingT struct { 30 | didFail bool 31 | } 32 | 33 | func (fakeT *fakeTestingT) Fail() { 34 | fakeT.didFail = true 35 | } 36 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/pkg/system/stat.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import ( 4 | "syscall" 5 | ) 6 | 7 | type Stat struct { 8 | mode uint32 9 | uid uint32 10 | gid uint32 11 | rdev uint64 12 | size int64 13 | mtim syscall.Timespec 14 | } 15 | 16 | func (s Stat) Mode() uint32 { 17 | return s.mode 18 | } 19 | 20 | func (s Stat) Uid() uint32 { 21 | return s.uid 22 | } 23 | 24 | func (s Stat) Gid() uint32 { 25 | return s.gid 26 | } 27 | 28 | func (s Stat) Rdev() uint64 { 29 | return s.rdev 30 | } 31 | 32 | func (s Stat) Size() int64 { 33 | return s.size 34 | } 35 | 36 | func (s Stat) Mtim() syscall.Timespec { 37 | return s.mtim 38 | } 39 | 40 | func (s Stat) GetLastModification() syscall.Timespec { 41 | return s.Mtim() 42 | } 43 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/gomega/matchers/be_true_matcher.go: -------------------------------------------------------------------------------- 1 | package matchers 2 | 3 | import ( 4 | "fmt" 5 | "github.com/onsi/gomega/format" 6 | ) 7 | 8 | type BeTrueMatcher struct { 9 | } 10 | 11 | func (matcher *BeTrueMatcher) Match(actual interface{}) (success bool, err error) { 12 | if !isBool(actual) { 13 | return false, fmt.Errorf("Expected a boolean. Got:\n%s", format.Object(actual, 1)) 14 | } 15 | 16 | return actual.(bool), nil 17 | } 18 | 19 | func (matcher *BeTrueMatcher) FailureMessage(actual interface{}) (message string) { 20 | return format.Message(actual, "to be true") 21 | } 22 | 23 | func (matcher *BeTrueMatcher) NegatedFailureMessage(actual interface{}) (message string) { 24 | return format.Message(actual, "not to be true") 25 | } 26 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/pkg/tarsum/builder_context.go: -------------------------------------------------------------------------------- 1 | package tarsum 2 | 3 | // This interface extends TarSum by adding the Remove method. In general 4 | // there was concern about adding this method to TarSum itself so instead 5 | // it is being added just to "BuilderContext" which will then only be used 6 | // during the .dockerignore file processing - see builder/evaluator.go 7 | type BuilderContext interface { 8 | TarSum 9 | Remove(string) 10 | } 11 | 12 | func (bc *tarSum) Remove(filename string) { 13 | for i, fis := range bc.sums { 14 | if fis.Name() == filename { 15 | bc.sums = append(bc.sums[:i], bc.sums[i+1:]...) 16 | // Note, we don't just return because there could be 17 | // more than one with this name 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/gorilla/websocket/examples/chat/README.md: -------------------------------------------------------------------------------- 1 | # Chat Example 2 | 3 | This application shows how to use use the 4 | [websocket](https://github.com/gorilla/websocket) package and 5 | [jQuery](http://jquery.com) to implement a simple web chat application. 6 | 7 | ## Running the example 8 | 9 | The example requires a working Go development environment. The [Getting 10 | Started](http://golang.org/doc/install) page describes how to install the 11 | development environment. 12 | 13 | Once you have Go up and running, you can download, build and run the example 14 | using the following commands. 15 | 16 | $ go get github.com/gorilla/websocket 17 | $ cd `go list -f '{{.Dir}}' github.com/gorilla/websocket/examples/chat` 18 | $ go run *.go 19 | 20 | -------------------------------------------------------------------------------- /cluster/brain/upstart/receptor.conf: -------------------------------------------------------------------------------- 1 | #!upstart 2 | 3 | start on started gnatsd 4 | stop on shutdown 5 | respawn 6 | 7 | script 8 | echo "UPSTART: Trying to start receptor - `date --rfc-3339=ns`" 9 | export $(cat /var/lattice/setup/lattice-environment) 10 | 11 | receptor -address=0.0.0.0:8888 \ 12 | -registerWithRouter=true \ 13 | -username="$LATTICE_USERNAME" \ 14 | -password="$LATTICE_PASSWORD" \ 15 | -consulCluster="http://127.0.0.1:8500" \ 16 | -domainNames=receptor.$SYSTEM_DOMAIN \ 17 | -corsEnabled=true \ 18 | -natsAddresses=127.0.0.1:4222 \ 19 | -natsUsername=nats \ 20 | -natsPassword=nats \ 21 | >> /var/lattice/log/receptor-service.log 2>&1 22 | end script 23 | 24 | post-stop exec sleep 5 25 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/gomega/matchers/be_false_matcher.go: -------------------------------------------------------------------------------- 1 | package matchers 2 | 3 | import ( 4 | "fmt" 5 | "github.com/onsi/gomega/format" 6 | ) 7 | 8 | type BeFalseMatcher struct { 9 | } 10 | 11 | func (matcher *BeFalseMatcher) Match(actual interface{}) (success bool, err error) { 12 | if !isBool(actual) { 13 | return false, fmt.Errorf("Expected a boolean. Got:\n%s", format.Object(actual, 1)) 14 | } 15 | 16 | return actual == false, nil 17 | } 18 | 19 | func (matcher *BeFalseMatcher) FailureMessage(actual interface{}) (message string) { 20 | return format.Message(actual, "to be false") 21 | } 22 | 23 | func (matcher *BeFalseMatcher) NegatedFailureMessage(actual interface{}) (message string) { 24 | return format.Message(actual, "not to be false") 25 | } 26 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/dockerversion/dockerversion.go: -------------------------------------------------------------------------------- 1 | package dockerversion 2 | 3 | // FIXME: this should be embedded in the docker/docker.go, 4 | // but we can't because distro policy requires us to 5 | // package a separate dockerinit binary, and that binary needs 6 | // to know its version too. 7 | 8 | var ( 9 | GITCOMMIT string 10 | VERSION string 11 | 12 | IAMSTATIC string // whether or not Docker itself was compiled statically via ./hack/make.sh binary ("true" or not "true") 13 | INITSHA1 string // sha1sum of separate static dockerinit, if Docker itself was compiled dynamically via ./hack/make.sh dynbinary 14 | INITPATH string // custom location to search for a valid dockerinit binary (available for packagers as a last resort escape hatch) 15 | ) 16 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/registry/v2/doc.go: -------------------------------------------------------------------------------- 1 | // Package v2 describes routes, urls and the error codes used in the Docker 2 | // Registry JSON HTTP API V2. In addition to declarations, descriptors are 3 | // provided for routes and error codes that can be used for implementation and 4 | // automatically generating documentation. 5 | // 6 | // Definitions here are considered to be locked down for the V2 registry api. 7 | // Any changes must be considered carefully and should not proceed without a 8 | // change proposal. 9 | // 10 | // Currently, while the HTTP API definitions are considered stable, the Go API 11 | // exports are considered unstable. Go API consumers should take care when 12 | // relying on these definitions until this message is deleted. 13 | package v2 14 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/ginkgo/internal/remote/fake_poster_test.go: -------------------------------------------------------------------------------- 1 | package remote_test 2 | 3 | import ( 4 | "io" 5 | "io/ioutil" 6 | "net/http" 7 | ) 8 | 9 | type post struct { 10 | url string 11 | bodyType string 12 | bodyContent []byte 13 | } 14 | 15 | type fakePoster struct { 16 | posts []post 17 | } 18 | 19 | func newFakePoster() *fakePoster { 20 | return &fakePoster{ 21 | posts: make([]post, 0), 22 | } 23 | } 24 | 25 | func (poster *fakePoster) Post(url string, bodyType string, body io.Reader) (resp *http.Response, err error) { 26 | bodyContent, _ := ioutil.ReadAll(body) 27 | poster.posts = append(poster.posts, post{ 28 | url: url, 29 | bodyType: bodyType, 30 | bodyContent: bodyContent, 31 | }) 32 | return nil, nil 33 | } 34 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/gizak/termui/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 Zack Guo . All rights reserved. 2 | // Use of this source code is governed by a MIT license that can 3 | // be found in the LICENSE file. 4 | 5 | /* 6 | Package termui is a library designed for creating command line UI. For more info, goto http://github.com/gizak/termui 7 | 8 | A simplest example: 9 | package main 10 | 11 | import ui "github.com/gizak/termui" 12 | 13 | func main() { 14 | if err:=ui.Init(); err != nil { 15 | panic(err) 16 | } 17 | defer ui.Close() 18 | 19 | g := ui.NewGauge() 20 | g.Percent = 50 21 | g.Width = 50 22 | g.Border.Label = "Gauge" 23 | 24 | ui.Render(g) 25 | } 26 | */ 27 | package termui 28 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/pkg/system/stat_test.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import ( 4 | "os" 5 | "syscall" 6 | "testing" 7 | ) 8 | 9 | func TestFromStatT(t *testing.T) { 10 | file, _, _, dir := prepareFiles(t) 11 | defer os.RemoveAll(dir) 12 | 13 | stat := &syscall.Stat_t{} 14 | err := syscall.Lstat(file, stat) 15 | 16 | s, err := fromStatT(stat) 17 | if err != nil { 18 | t.Fatal(err) 19 | } 20 | 21 | if stat.Mode != s.Mode() { 22 | t.Fatal("got invalid mode") 23 | } 24 | if stat.Uid != s.Uid() { 25 | t.Fatal("got invalid uid") 26 | } 27 | if stat.Gid != s.Gid() { 28 | t.Fatal("got invalid gid") 29 | } 30 | if stat.Rdev != s.Rdev() { 31 | t.Fatal("got invalid rdev") 32 | } 33 | if stat.Mtim != s.Mtim() { 34 | t.Fatal("got invalid mtim") 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /ltc/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 | -------------------------------------------------------------------------------- /cluster/brain/config/doppler.json: -------------------------------------------------------------------------------- 1 | { 2 | "EtcdUrls": ["http://127.0.0.1:4001"], 3 | "EtcdMaxConcurrentRequests": 10, 4 | "WSMessageBufferSize": 100, 5 | "LegacyIncomingMessagesPort": 3456, 6 | "DropsondeIncomingMessagesPort": 3458, 7 | "OutgoingPort": 8081, 8 | "Zone": "z1", 9 | "SkipCertVerify": true, 10 | "JobName": "loggregator_z1", 11 | "Index": 0, 12 | "MaxRetainedLogMessages": 100, 13 | "CollectorRegistrarIntervalMilliseconds": 60000, 14 | "SharedSecret": "loggregator-secret", 15 | "NatsHosts": ["127.0.0.1"], 16 | "NatsPort": 4222, 17 | "NatsUser": "nats", 18 | "NatsPass": "nats", 19 | "VarzUser": "", 20 | "VarzPass": "", 21 | "VarzPort": 0, 22 | "ContainerMetricTTLSeconds": 120, 23 | "SinkInactivityTimeoutSeconds": 3600 24 | } 25 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/gomega/matchers/be_zero_matcher.go: -------------------------------------------------------------------------------- 1 | package matchers 2 | 3 | import ( 4 | "github.com/onsi/gomega/format" 5 | "reflect" 6 | ) 7 | 8 | type BeZeroMatcher struct { 9 | } 10 | 11 | func (matcher *BeZeroMatcher) Match(actual interface{}) (success bool, err error) { 12 | if actual == nil { 13 | return true, nil 14 | } 15 | zeroValue := reflect.Zero(reflect.TypeOf(actual)).Interface() 16 | 17 | return reflect.DeepEqual(zeroValue, actual), nil 18 | 19 | } 20 | 21 | func (matcher *BeZeroMatcher) FailureMessage(actual interface{}) (message string) { 22 | return format.Message(actual, "to be zero-valued") 23 | } 24 | 25 | func (matcher *BeZeroMatcher) NegatedFailureMessage(actual interface{}) (message string) { 26 | return format.Message(actual, "not to be zero-valued") 27 | } 28 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/pivotal-golang/clock/clock.go: -------------------------------------------------------------------------------- 1 | package clock 2 | 3 | import "time" 4 | 5 | type Clock interface { 6 | Now() time.Time 7 | Sleep(d time.Duration) 8 | 9 | NewTimer(d time.Duration) Timer 10 | NewTicker(d time.Duration) Ticker 11 | } 12 | 13 | type realClock struct{} 14 | 15 | func NewClock() Clock { 16 | return &realClock{} 17 | } 18 | 19 | func (clock *realClock) Now() time.Time { 20 | return time.Now() 21 | } 22 | 23 | func (clock *realClock) Sleep(d time.Duration) { 24 | <-clock.NewTimer(d).C() 25 | } 26 | 27 | func (clock *realClock) NewTimer(d time.Duration) Timer { 28 | return &realTimer{ 29 | t: time.NewTimer(d), 30 | } 31 | } 32 | 33 | func (clock *realClock) NewTicker(d time.Duration) Ticker { 34 | return &realTicker{ 35 | t: time.NewTicker(d), 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/ginkgo/internal/remote/output_interceptor_win.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package remote 4 | 5 | import ( 6 | "errors" 7 | ) 8 | 9 | func NewOutputInterceptor() OutputInterceptor { 10 | return &outputInterceptor{} 11 | } 12 | 13 | type outputInterceptor struct { 14 | intercepting bool 15 | } 16 | 17 | func (interceptor *outputInterceptor) StartInterceptingOutput() error { 18 | if interceptor.intercepting { 19 | return errors.New("Already intercepting output!") 20 | } 21 | interceptor.intercepting = true 22 | 23 | // not working on windows... 24 | 25 | return nil 26 | } 27 | 28 | func (interceptor *outputInterceptor) StopInterceptingAndReturnOutput() (string, error) { 29 | // not working on windows... 30 | interceptor.intercepting = false 31 | 32 | return "", nil 33 | } 34 | -------------------------------------------------------------------------------- /cluster/cell/upstart/executor.conf: -------------------------------------------------------------------------------- 1 | #!upstart 2 | 3 | start on started garden-linux 4 | stop on shutdown 5 | respawn 6 | 7 | script 8 | echo "UPSTART: Trying to start executor - `date --rfc-3339=ns`" 9 | 10 | export $(cat /var/lattice/setup/lattice-environment) 11 | 12 | tee2metron -dropsondeDestination=127.0.0.1:3457 -sourceInstance=$LATTICE_CELL_ID \ 13 | executor -listenAddr=0.0.0.0:1700 \ 14 | -gardenNetwork=tcp \ 15 | -gardenAddr=127.0.0.1:7777 \ 16 | -memoryMB=auto \ 17 | -diskMB=auto \ 18 | -containerInodeLimit=200000 \ 19 | -containerMaxCpuShares=1024 \ 20 | -allowPrivileged \ 21 | -skipCertVerify \ 22 | -exportNetworkEnvVars \ 23 | >> /var/lattice/log/executor-service.log 2>&1 24 | 25 | end script 26 | 27 | post-stop exec sleep 5 28 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/libtrust/README.md: -------------------------------------------------------------------------------- 1 | # libtrust 2 | 3 | Libtrust is library for managing authentication and authorization using public key cryptography. 4 | 5 | Authentication is handled using the identity attached to the public key. 6 | Libtrust provides multiple methods to prove possession of the private key associated with an identity. 7 | - TLS x509 certificates 8 | - Signature verification 9 | - Key Challenge 10 | 11 | Authorization and access control is managed through a distributed trust graph. 12 | Trust servers are used as the authorities of the trust graph and allow caching portions of the graph for faster access. 13 | 14 | ## Copyright and license 15 | 16 | Code and documentation copyright 2014 Docker, inc. Code released under the Apache 2.0 license. 17 | Docs released under Creative commons. 18 | 19 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/ginkgo/ginkgo/help_command.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "flag" 5 | "fmt" 6 | ) 7 | 8 | func BuildHelpCommand() *Command { 9 | return &Command{ 10 | Name: "help", 11 | FlagSet: flag.NewFlagSet("help", flag.ExitOnError), 12 | UsageCommand: "ginkgo help ", 13 | Usage: []string{ 14 | "Print usage information. If a command is passed in, print usage information just for that command.", 15 | }, 16 | Command: printHelp, 17 | } 18 | } 19 | 20 | func printHelp(args []string, additionalArgs []string) { 21 | if len(args) == 0 { 22 | usage() 23 | } else { 24 | command, found := commandMatching(args[0]) 25 | if !found { 26 | complainAndQuit(fmt.Sprintf("Unknown command: %s", args[0])) 27 | } 28 | 29 | usageForCommand(command, true) 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /ltc/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 | 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 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/gomega/matchers/be_empty_matcher.go: -------------------------------------------------------------------------------- 1 | package matchers 2 | 3 | import ( 4 | "fmt" 5 | "github.com/onsi/gomega/format" 6 | ) 7 | 8 | type BeEmptyMatcher struct { 9 | } 10 | 11 | func (matcher *BeEmptyMatcher) Match(actual interface{}) (success bool, err error) { 12 | length, ok := lengthOf(actual) 13 | if !ok { 14 | return false, fmt.Errorf("BeEmpty matcher expects a string/array/map/channel/slice. Got:\n%s", format.Object(actual, 1)) 15 | } 16 | 17 | return length == 0, nil 18 | } 19 | 20 | func (matcher *BeEmptyMatcher) FailureMessage(actual interface{}) (message string) { 21 | return format.Message(actual, "to be empty") 22 | } 23 | 24 | func (matcher *BeEmptyMatcher) NegatedFailureMessage(actual interface{}) (message string) { 25 | return format.Message(actual, "not to be empty") 26 | } 27 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/daemon/graphdriver/btrfs/btrfs_test.go: -------------------------------------------------------------------------------- 1 | package btrfs 2 | 3 | import ( 4 | "github.com/docker/docker/daemon/graphdriver/graphtest" 5 | "testing" 6 | ) 7 | 8 | // This avoids creating a new driver for each test if all tests are run 9 | // Make sure to put new tests between TestBtrfsSetup and TestBtrfsTeardown 10 | func TestBtrfsSetup(t *testing.T) { 11 | graphtest.GetDriver(t, "btrfs") 12 | } 13 | 14 | func TestBtrfsCreateEmpty(t *testing.T) { 15 | graphtest.DriverTestCreateEmpty(t, "btrfs") 16 | } 17 | 18 | func TestBtrfsCreateBase(t *testing.T) { 19 | graphtest.DriverTestCreateBase(t, "btrfs") 20 | } 21 | 22 | func TestBtrfsCreateSnap(t *testing.T) { 23 | graphtest.DriverTestCreateSnap(t, "btrfs") 24 | } 25 | 26 | func TestBtrfsTeardown(t *testing.T) { 27 | graphtest.PutDriver(t) 28 | } 29 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/pkg/fileutils/fileutils.go: -------------------------------------------------------------------------------- 1 | package fileutils 2 | 3 | import ( 4 | log "github.com/Sirupsen/logrus" 5 | "path/filepath" 6 | ) 7 | 8 | // Matches returns true if relFilePath matches any of the patterns 9 | func Matches(relFilePath string, patterns []string) (bool, error) { 10 | for _, exclude := range patterns { 11 | matched, err := filepath.Match(exclude, relFilePath) 12 | if err != nil { 13 | log.Errorf("Error matching: %s (pattern: %s)", relFilePath, exclude) 14 | return false, err 15 | } 16 | if matched { 17 | if filepath.Clean(relFilePath) == "." { 18 | log.Errorf("Can't exclude whole path, excluding pattern: %s", exclude) 19 | continue 20 | } 21 | log.Debugf("Skipping excluded path: %s", relFilePath) 22 | return true, nil 23 | } 24 | } 25 | return false, nil 26 | } 27 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/gomega/matchers/be_zero_matcher_test.go: -------------------------------------------------------------------------------- 1 | package matchers_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | ) 7 | 8 | var _ = Describe("BeZero", func() { 9 | It("should succeed if the passed in object is the zero value for its type", func() { 10 | Ω(nil).Should(BeZero()) 11 | 12 | Ω("").Should(BeZero()) 13 | Ω(" ").ShouldNot(BeZero()) 14 | 15 | Ω(0).Should(BeZero()) 16 | Ω(1).ShouldNot(BeZero()) 17 | 18 | Ω(0.0).Should(BeZero()) 19 | Ω(0.1).ShouldNot(BeZero()) 20 | 21 | // Ω([]int{}).Should(BeZero()) 22 | Ω([]int{1}).ShouldNot(BeZero()) 23 | 24 | // Ω(map[string]int{}).Should(BeZero()) 25 | Ω(map[string]int{"a": 1}).ShouldNot(BeZero()) 26 | 27 | Ω(myCustomType{}).Should(BeZero()) 28 | Ω(myCustomType{s: "a"}).ShouldNot(BeZero()) 29 | }) 30 | }) 31 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/gomega/matchers/have_occurred_matcher_test.go: -------------------------------------------------------------------------------- 1 | package matchers_test 2 | 3 | import ( 4 | "errors" 5 | . "github.com/onsi/ginkgo" 6 | . "github.com/onsi/gomega" 7 | . "github.com/onsi/gomega/matchers" 8 | ) 9 | 10 | var _ = Describe("HaveOccurred", func() { 11 | It("should succeed if matching an error", func() { 12 | Ω(errors.New("Foo")).Should(HaveOccurred()) 13 | }) 14 | 15 | It("should not succeed with nil", func() { 16 | Ω(nil).ShouldNot(HaveOccurred()) 17 | }) 18 | 19 | It("should only support errors and nil", func() { 20 | success, err := (&HaveOccurredMatcher{}).Match("foo") 21 | Ω(success).Should(BeFalse()) 22 | Ω(err).Should(HaveOccurred()) 23 | 24 | success, err = (&HaveOccurredMatcher{}).Match("") 25 | Ω(success).Should(BeFalse()) 26 | Ω(err).Should(HaveOccurred()) 27 | }) 28 | }) 29 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/cloudfoundry/noaa/container_metrics_sample/container_metrics_emitter.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "github.com/cloudfoundry/dropsonde" 5 | "github.com/cloudfoundry/dropsonde/metrics" 6 | "time" 7 | ) 8 | 9 | var appId = "60a13b0f-fce7-4c02-b92a-d43d583877ed" 10 | 11 | func main() { 12 | err := dropsonde.Initialize("localhost:3457", "METRIC-TEST", "z1", "0") 13 | if err != nil { 14 | println(err.Error()) 15 | } 16 | 17 | var i uint64 18 | i = 0 19 | for { 20 | println("emitting metric at counter: ", i) 21 | metrics.SendContainerMetric(appId, 0, 42.42, 1234, i) 22 | metrics.SendContainerMetric(appId, 1, 11.41, 1234, i) 23 | metrics.SendContainerMetric(appId, 2, 11.41, 1234, i) 24 | metrics.SendContainerMetric("donotseethis", 2, 11.41, 1234, i) 25 | i++ 26 | time.Sleep(1 * time.Second) 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/daemon/graphdriver/overlay/overlay_test.go: -------------------------------------------------------------------------------- 1 | package overlay 2 | 3 | import ( 4 | "github.com/docker/docker/daemon/graphdriver/graphtest" 5 | "testing" 6 | ) 7 | 8 | // This avoids creating a new driver for each test if all tests are run 9 | // Make sure to put new tests between TestOverlaySetup and TestOverlayTeardown 10 | func TestOverlaySetup(t *testing.T) { 11 | graphtest.GetDriver(t, "overlay") 12 | } 13 | 14 | func TestOverlayCreateEmpty(t *testing.T) { 15 | graphtest.DriverTestCreateEmpty(t, "overlay") 16 | } 17 | 18 | func TestOverlayCreateBase(t *testing.T) { 19 | graphtest.DriverTestCreateBase(t, "overlay") 20 | } 21 | 22 | func TestOverlayCreateSnap(t *testing.T) { 23 | graphtest.DriverTestCreateSnap(t, "overlay") 24 | } 25 | 26 | func TestOverlayTeardown(t *testing.T) { 27 | graphtest.PutDriver(t) 28 | } 29 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/ginkgo/internal/leafnodes/it_node_test.go: -------------------------------------------------------------------------------- 1 | package leafnodes_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/ginkgo/internal/leafnodes" 6 | . "github.com/onsi/gomega" 7 | 8 | "github.com/onsi/ginkgo/internal/codelocation" 9 | "github.com/onsi/ginkgo/types" 10 | ) 11 | 12 | var _ = Describe("It Nodes", func() { 13 | It("should report the correct type, text, flag, and code location", func() { 14 | codeLocation := codelocation.New(0) 15 | it := NewItNode("my it node", func() {}, types.FlagTypeFocused, codeLocation, 0, nil, 3) 16 | Ω(it.Type()).Should(Equal(types.SpecComponentTypeIt)) 17 | Ω(it.Flag()).Should(Equal(types.FlagTypeFocused)) 18 | Ω(it.Text()).Should(Equal("my it node")) 19 | Ω(it.CodeLocation()).Should(Equal(codeLocation)) 20 | Ω(it.Samples()).Should(Equal(1)) 21 | }) 22 | }) 23 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/gomega/matchers/equal_matcher.go: -------------------------------------------------------------------------------- 1 | package matchers 2 | 3 | import ( 4 | "fmt" 5 | "github.com/onsi/gomega/format" 6 | "reflect" 7 | ) 8 | 9 | type EqualMatcher struct { 10 | Expected interface{} 11 | } 12 | 13 | func (matcher *EqualMatcher) Match(actual interface{}) (success bool, err error) { 14 | if actual == nil && matcher.Expected == nil { 15 | return false, fmt.Errorf("Refusing to compare to .") 16 | } 17 | return reflect.DeepEqual(actual, matcher.Expected), nil 18 | } 19 | 20 | func (matcher *EqualMatcher) FailureMessage(actual interface{}) (message string) { 21 | return format.Message(actual, "to equal", matcher.Expected) 22 | } 23 | 24 | func (matcher *EqualMatcher) NegatedFailureMessage(actual interface{}) (message string) { 25 | return format.Message(actual, "not to equal", matcher.Expected) 26 | } 27 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/gomega/matchers/succeed_matcher.go: -------------------------------------------------------------------------------- 1 | package matchers 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/onsi/gomega/format" 7 | ) 8 | 9 | type SucceedMatcher struct { 10 | } 11 | 12 | func (matcher *SucceedMatcher) Match(actual interface{}) (success bool, err error) { 13 | if actual == nil { 14 | return true, nil 15 | } 16 | 17 | if isError(actual) { 18 | return false, nil 19 | } 20 | 21 | return false, fmt.Errorf("Expected an error-type. Got:\n%s", format.Object(actual, 1)) 22 | } 23 | 24 | func (matcher *SucceedMatcher) FailureMessage(actual interface{}) (message string) { 25 | return fmt.Sprintf("Expected success, but got an error:\n%s", format.Object(actual, 1)) 26 | } 27 | 28 | func (matcher *SucceedMatcher) NegatedFailureMessage(actual interface{}) (message string) { 29 | return "Expected failure, but got no error." 30 | } 31 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/pkg/ioutils/writers.go: -------------------------------------------------------------------------------- 1 | package ioutils 2 | 3 | import "io" 4 | 5 | type NopWriter struct{} 6 | 7 | func (*NopWriter) Write(buf []byte) (int, error) { 8 | return len(buf), nil 9 | } 10 | 11 | type nopWriteCloser struct { 12 | io.Writer 13 | } 14 | 15 | func (w *nopWriteCloser) Close() error { return nil } 16 | 17 | func NopWriteCloser(w io.Writer) io.WriteCloser { 18 | return &nopWriteCloser{w} 19 | } 20 | 21 | type NopFlusher struct{} 22 | 23 | func (f *NopFlusher) Flush() {} 24 | 25 | type writeCloserWrapper struct { 26 | io.Writer 27 | closer func() error 28 | } 29 | 30 | func (r *writeCloserWrapper) Close() error { 31 | return r.closer() 32 | } 33 | 34 | func NewWriteCloserWrapper(r io.Writer, closer func() error) io.WriteCloser { 35 | return &writeCloserWrapper{ 36 | Writer: r, 37 | closer: closer, 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /ltc/test_helpers/regex_safe_say.go: -------------------------------------------------------------------------------- 1 | package test_helpers 2 | 3 | import ( 4 | "fmt" 5 | "regexp" 6 | 7 | "github.com/onsi/gomega/gbytes" 8 | "github.com/onsi/gomega/types" 9 | ) 10 | 11 | func Say(expected string, args ...interface{}) types.GomegaMatcher { 12 | return gbytes.Say(regexSafe(expected)) 13 | } 14 | 15 | func SayLine(expected string, args ...interface{}) types.GomegaMatcher { 16 | return gbytes.Say(regexSafe(expected) + "\n") 17 | } 18 | 19 | func SayNewLine() types.GomegaMatcher { 20 | return Say("\n") 21 | } 22 | 23 | func SayIncorrectUsage() types.GomegaMatcher { 24 | return gbytes.Say(regexSafe("Incorrect Usage")) 25 | } 26 | 27 | var regex = regexp.MustCompile("[-/\\\\^$*+?.()|[\\]{}]") 28 | 29 | func regexSafe(matcher string) string { 30 | return regex.ReplaceAllStringFunc(matcher, func(s string) string { 31 | return fmt.Sprintf("\\%s", s) 32 | }) 33 | } 34 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/cloudfoundry-incubator/receptor/doc/auth.md: -------------------------------------------------------------------------------- 1 | # Authorization 2 | 3 | All requests to the Receptor API may be protected with basic auth. 4 | 5 | Some endpoints, for example those serving an event stream, have specific 6 | browser APIs (e.g. `EventSource`) that do not support basic auth. For this 7 | reason, all endpoints also support setting the authorization via a cookie, 8 | called `receptor_authorization`. The value of this cookie is the same format 9 | as the `Authorization` header. 10 | 11 | ## CORS 12 | 13 | The Receptor supports 14 | [CORS](http://en.wikipedia.org/wiki/Cross-origin_resource_sharing). Any 15 | `Origin` sent to the Receptor will be permitted, and all credentials are 16 | allowed (`Access-Control-Allow-Credentials`). This, in combination with the 17 | aforementioned cookie, allows third-party applications to access the 18 | Receptor API. 19 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/cloudfoundry-incubator/runtime-schema/models/lrp_start_request.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | type LRPStartRequest struct { 4 | DesiredLRP DesiredLRP `json:"desired_lrp"` 5 | Indices []uint `json:"indices"` 6 | } 7 | 8 | func NewLRPStartRequest(d DesiredLRP, indices ...uint) LRPStartRequest { 9 | return LRPStartRequest{ 10 | DesiredLRP: d, 11 | Indices: indices, 12 | } 13 | } 14 | 15 | func (lrpstart LRPStartRequest) Validate() error { 16 | var validationError ValidationError 17 | 18 | err := lrpstart.DesiredLRP.Validate() 19 | if err != nil { 20 | validationError = validationError.Append(err) 21 | } 22 | 23 | if len(lrpstart.Indices) == 0 { 24 | validationError = validationError.Append(ErrInvalidField{"indices"}) 25 | } 26 | 27 | if !validationError.Empty() { 28 | return validationError 29 | } 30 | 31 | return nil 32 | } 33 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/cloudfoundry-incubator/cf_http/cf_http.go: -------------------------------------------------------------------------------- 1 | package cf_http 2 | 3 | import ( 4 | "net" 5 | "net/http" 6 | "time" 7 | ) 8 | 9 | var config Config 10 | 11 | type Config struct { 12 | Timeout time.Duration 13 | } 14 | 15 | func Initialize(timeout time.Duration) { 16 | config.Timeout = timeout 17 | } 18 | 19 | func NewClient() *http.Client { 20 | return newClient(5*time.Second, 0*time.Second, config.Timeout) 21 | } 22 | 23 | func NewStreamingClient() *http.Client { 24 | return newClient(5*time.Second, 30*time.Second, 0*time.Second) 25 | } 26 | 27 | func newClient(dialTimeout, keepAliveTimeout, timeout time.Duration) *http.Client { 28 | return &http.Client{ 29 | Transport: &http.Transport{ 30 | Dial: (&net.Dialer{ 31 | Timeout: dialTimeout, 32 | KeepAlive: keepAliveTimeout, 33 | }).Dial, 34 | }, 35 | Timeout: timeout, 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/cloudfoundry-incubator/runtime-schema/models/models_suite_test.go: -------------------------------------------------------------------------------- 1 | package models_test 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/cloudfoundry-incubator/runtime-schema/models" 7 | 8 | . "github.com/onsi/ginkgo" 9 | . "github.com/onsi/gomega" 10 | ) 11 | 12 | type ValidatorErrorCase struct { 13 | Message string 14 | models.Validator 15 | } 16 | 17 | func testValidatorErrorCase(testCase ValidatorErrorCase) { 18 | message := testCase.Message 19 | invalid := testCase.Validator 20 | 21 | Context("when invalid", func() { 22 | It("returns an error indicating '"+message+"'", func() { 23 | err := invalid.Validate() 24 | Ω(err).Should(HaveOccurred()) 25 | Ω(err.Error()).Should(ContainSubstring(message)) 26 | }) 27 | }) 28 | } 29 | 30 | func TestModels(t *testing.T) { 31 | RegisterFailHandler(Fail) 32 | RunSpecs(t, "Models Suite") 33 | } 34 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/cloudfoundry-incubator/receptor/task_handler/handlers.go: -------------------------------------------------------------------------------- 1 | package task_handler 2 | 3 | import ( 4 | "net/http" 5 | 6 | "github.com/cloudfoundry-incubator/receptor/handlers" 7 | "github.com/cloudfoundry-incubator/runtime-schema/models" 8 | "github.com/cloudfoundry-incubator/runtime-schema/routes" 9 | "github.com/pivotal-golang/lager" 10 | "github.com/tedsuo/rata" 11 | ) 12 | 13 | func New(enqueue chan<- models.Task, logger lager.Logger) http.Handler { 14 | taskHandler := NewHandler(enqueue, logger) 15 | 16 | actions := rata.Handlers{ 17 | // internal Tasks 18 | routes.CompleteTasks: taskHandler, 19 | } 20 | 21 | handler, err := rata.NewRouter(routes.CompleteTasksRoutes, actions) 22 | if err != nil { 23 | panic("unable to create router: " + err.Error()) 24 | } 25 | 26 | handler = handlers.LogWrap(handler, logger) 27 | 28 | return handler 29 | } 30 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/pkg/ioutils/readers_test.go: -------------------------------------------------------------------------------- 1 | package ioutils 2 | 3 | import ( 4 | "bytes" 5 | "io" 6 | "io/ioutil" 7 | "testing" 8 | ) 9 | 10 | func TestBufReader(t *testing.T) { 11 | reader, writer := io.Pipe() 12 | bufreader := NewBufReader(reader) 13 | 14 | // Write everything down to a Pipe 15 | // Usually, a pipe should block but because of the buffered reader, 16 | // the writes will go through 17 | done := make(chan bool) 18 | go func() { 19 | writer.Write([]byte("hello world")) 20 | writer.Close() 21 | done <- true 22 | }() 23 | 24 | // Drain the reader *after* everything has been written, just to verify 25 | // it is indeed buffering 26 | <-done 27 | output, err := ioutil.ReadAll(bufreader) 28 | if err != nil { 29 | t.Fatal(err) 30 | } 31 | if !bytes.Equal(output, []byte("hello world")) { 32 | t.Error(string(output)) 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /cluster/brain/config/gorouter.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | status: 4 | port: 8090 5 | user: router 6 | pass: "router" 7 | 8 | 9 | nats: 10 | - host: 127.0.0.1 11 | port: 4222 12 | user: nats 13 | pass: "nats" 14 | 15 | 16 | logging: 17 | file: /var/lattice/log/gorouter.log 18 | metron_address: 127.0.0.1:3457 19 | level: info 20 | loggregator_enabled: true 21 | 22 | 23 | #loggregatorConfig: 24 | # url: 127.0.0.1:3456 25 | # shared_secret: loggregator-secret 26 | 27 | port: 80 28 | index: 0 29 | pidfile: /var/lattice/run/gorouter.pid 30 | go_max_procs: 8 31 | trace_key: 22 32 | access_log: /var/lattice/log/gorouter-access.log 33 | 34 | publish_start_message_interval: 30 35 | prune_stale_droplets_interval: 30 36 | droplet_stale_threshold: 120 37 | publish_active_apps_interval: 0 # 0 means disabled 38 | 39 | endpoint_timeout: 300 40 | 41 | start_response_delay_interval_in_seconds: 20 42 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/cloudfoundry-incubator/receptor/errors.go: -------------------------------------------------------------------------------- 1 | package receptor 2 | 3 | type Error struct { 4 | Type string `json:"name"` 5 | Message string `json:"message"` 6 | } 7 | 8 | func (err Error) Error() string { 9 | return err.Message 10 | } 11 | 12 | const ( 13 | TaskGuidAlreadyExists = "TaskGuidAlreadyExists" 14 | TaskNotDeletable = "TaskNotDeletable" 15 | TaskNotFound = "TaskNotFound" 16 | InvalidTask = "InvalidTask" 17 | 18 | DesiredLRPAlreadyExists = "DesiredLRPAlreadyExists" 19 | DesiredLRPNotFound = "DesiredLRPNotFound" 20 | InvalidLRP = "InvalidLRP" 21 | 22 | InvalidDomain = "InvalidDomain" 23 | 24 | InvalidJSON = "InvalidJSON" 25 | InvalidRequest = "InvalidRequest" 26 | 27 | UnknownError = "UnknownError" 28 | Unauthorized = "Unauthorized" 29 | 30 | ActualLRPIndexNotFound = "ActualLRPIndexNotFound" 31 | ) 32 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/cloudfoundry/noaa/sort_container_metrics.go: -------------------------------------------------------------------------------- 1 | package noaa 2 | 3 | import ( 4 | "github.com/cloudfoundry/noaa/events" 5 | "sort" 6 | ) 7 | 8 | // SortContainerMetrics sorts a slice of containerMetrics by InstanceIndex. 9 | // 10 | // The input slice is sorted; the return value is simply a pointer to the same slice. 11 | func SortContainerMetrics(messages []*events.ContainerMetric) []*events.ContainerMetric { 12 | sort.Sort(containerMetricSlice(messages)) 13 | return messages 14 | } 15 | 16 | type containerMetricSlice []*events.ContainerMetric 17 | 18 | func (lms containerMetricSlice) Len() int { 19 | return len(lms) 20 | } 21 | 22 | func (lms containerMetricSlice) Less(i, j int) bool { 23 | return (*(lms[i])).GetInstanceIndex() < (*(lms[j])).GetInstanceIndex() 24 | } 25 | 26 | func (lms containerMetricSlice) Swap(i, j int) { 27 | lms[i], lms[j] = lms[j], lms[i] 28 | } 29 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/utils/daemon.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | import ( 4 | "fmt" 5 | "io/ioutil" 6 | "log" 7 | "os" 8 | "strconv" 9 | ) 10 | 11 | func CreatePidFile(pidfile string) error { 12 | if pidString, err := ioutil.ReadFile(pidfile); err == nil { 13 | pid, err := strconv.Atoi(string(pidString)) 14 | if err == nil { 15 | if _, err := os.Stat(fmt.Sprintf("/proc/%d/", pid)); err == nil { 16 | return fmt.Errorf("pid file found, ensure docker is not running or delete %s", pidfile) 17 | } 18 | } 19 | } 20 | 21 | file, err := os.Create(pidfile) 22 | if err != nil { 23 | return err 24 | } 25 | 26 | defer file.Close() 27 | 28 | _, err = fmt.Fprintf(file, "%d", os.Getpid()) 29 | return err 30 | } 31 | 32 | func RemovePidFile(pidfile string) { 33 | if err := os.Remove(pidfile); err != nil { 34 | log.Printf("Error removing %s: %s", pidfile, err) 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /cluster/brain/setup/trafficcontroller-template.json: -------------------------------------------------------------------------------- 1 | { 2 | "JobName": "loggregator_trafficcontroller_z1", 3 | "JobIndex": 0, 4 | "EtcdUrls": ["http://127.0.0.1:4001"], 5 | "EtcdMaxConcurrentRequests": 10, 6 | "OutgoingDropsondePort": 8082, 7 | "DopplerPort": 8081, 8 | "IncomingPort": 3456, 9 | "OutgoingPort": 8070, 10 | "SkipCertVerify": true, 11 | "SharedSecret": "loggregator-secret", 12 | "Zone": "z1", 13 | "Host": "0.0.0.0", 14 | "ApiHost": "DONTCARE", 15 | "SystemDomain": "SYSTEMDOMAIN_PLACEHOLDER", 16 | "NatsHosts": ["127.0.0.1"], 17 | "NatsPort": 4222, 18 | "NatsUser": "nats", 19 | "NatsPass": "nats", 20 | "VarzUser": "", 21 | "VarzPass": "", 22 | "VarzPort": 0, 23 | "CollectorRegistrarIntervalMilliseconds": 60000, 24 | "UaaHost": "DONTCARE", 25 | "UaaClientId": "doppler", 26 | "UaaClientSecret": "doppler-secret" 27 | } 28 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/cloudfoundry-incubator/runtime-schema/models/auctioneer_presence.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | type AuctioneerPresence struct { 4 | AuctioneerID string `json:"auctioneer_id"` 5 | AuctioneerAddress string `json:"auctioneer_address"` 6 | } 7 | 8 | func NewAuctioneerPresence(id, address string) AuctioneerPresence { 9 | return AuctioneerPresence{ 10 | AuctioneerID: id, 11 | AuctioneerAddress: address, 12 | } 13 | } 14 | 15 | func (a AuctioneerPresence) Validate() error { 16 | var validationError ValidationError 17 | 18 | if a.AuctioneerID == "" { 19 | validationError = validationError.Append(ErrInvalidField{"auctioneer_id"}) 20 | } 21 | 22 | if a.AuctioneerAddress == "" { 23 | validationError = validationError.Append(ErrInvalidField{"auctioneer_address"}) 24 | } 25 | 26 | if !validationError.Empty() { 27 | return validationError 28 | } 29 | 30 | return nil 31 | } 32 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/cloudfoundry/noaa/sort_recent.go: -------------------------------------------------------------------------------- 1 | package noaa 2 | 3 | import ( 4 | "github.com/cloudfoundry/noaa/events" 5 | "sort" 6 | ) 7 | 8 | // SortRecent sorts a slice of LogMessages by timestamp. The sort is stable, so messages with the same timestamp are sorted 9 | // in the order that they are received. 10 | // 11 | // The input slice is sorted; the return value is simply a pointer to the same slice. 12 | func SortRecent(messages []*events.LogMessage) []*events.LogMessage { 13 | sort.Stable(logMessageSlice(messages)) 14 | return messages 15 | } 16 | 17 | type logMessageSlice []*events.LogMessage 18 | 19 | func (lms logMessageSlice) Len() int { 20 | return len(lms) 21 | } 22 | 23 | func (lms logMessageSlice) Less(i, j int) bool { 24 | return *(lms[i]).Timestamp < *(lms[j]).Timestamp 25 | } 26 | 27 | func (lms logMessageSlice) Swap(i, j int) { 28 | lms[i], lms[j] = lms[j], lms[i] 29 | } 30 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/daemon/graphdriver/vfs/vfs_test.go: -------------------------------------------------------------------------------- 1 | package vfs 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/docker/docker/daemon/graphdriver/graphtest" 7 | 8 | "github.com/docker/docker/pkg/reexec" 9 | ) 10 | 11 | func init() { 12 | reexec.Init() 13 | } 14 | 15 | // This avoids creating a new driver for each test if all tests are run 16 | // Make sure to put new tests between TestVfsSetup and TestVfsTeardown 17 | func TestVfsSetup(t *testing.T) { 18 | graphtest.GetDriver(t, "vfs") 19 | } 20 | 21 | func TestVfsCreateEmpty(t *testing.T) { 22 | graphtest.DriverTestCreateEmpty(t, "vfs") 23 | } 24 | 25 | func TestVfsCreateBase(t *testing.T) { 26 | graphtest.DriverTestCreateBase(t, "vfs") 27 | } 28 | 29 | func TestVfsCreateSnap(t *testing.T) { 30 | graphtest.DriverTestCreateSnap(t, "vfs") 31 | } 32 | 33 | func TestVfsTeardown(t *testing.T) { 34 | graphtest.PutDriver(t) 35 | } 36 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/ginkgo/integration/tags_test.go: -------------------------------------------------------------------------------- 1 | package integration_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | "github.com/onsi/gomega/gexec" 7 | ) 8 | 9 | var _ = Describe("Tags", func() { 10 | var pathToTest string 11 | BeforeEach(func() { 12 | pathToTest = tmpPath("tags") 13 | copyIn("tags_tests", pathToTest) 14 | }) 15 | 16 | It("should honor the passed in -tags flag", func() { 17 | session := startGinkgo(pathToTest, "--noColor") 18 | Eventually(session).Should(gexec.Exit(0)) 19 | output := string(session.Out.Contents()) 20 | Ω(output).Should(ContainSubstring("Ran 1 of 1 Specs")) 21 | 22 | session = startGinkgo(pathToTest, "--noColor", "-tags=complex_tests") 23 | Eventually(session).Should(gexec.Exit(0)) 24 | output = string(session.Out.Contents()) 25 | Ω(output).Should(ContainSubstring("Ran 3 of 3 Specs")) 26 | }) 27 | }) 28 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/Sirupsen/logrus/text_formatter_test.go: -------------------------------------------------------------------------------- 1 | package logrus 2 | 3 | import ( 4 | "bytes" 5 | "errors" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestQuoting(t *testing.T) { 11 | tf := &TextFormatter{DisableColors: true} 12 | 13 | checkQuoting := func(q bool, value interface{}) { 14 | b, _ := tf.Format(WithField("test", value)) 15 | idx := bytes.Index(b, ([]byte)("test=")) 16 | cont := bytes.Contains(b[idx+5:], []byte{'"'}) 17 | if cont != q { 18 | if q { 19 | t.Errorf("quoting expected for: %#v", value) 20 | } else { 21 | t.Errorf("quoting not expected for: %#v", value) 22 | } 23 | } 24 | } 25 | 26 | checkQuoting(false, "abcd") 27 | checkQuoting(false, "v1.0") 28 | checkQuoting(true, "/foobar") 29 | checkQuoting(true, "x y") 30 | checkQuoting(true, "x,y") 31 | checkQuoting(false, errors.New("invalid")) 32 | checkQuoting(true, errors.New("invalid argument")) 33 | } 34 | -------------------------------------------------------------------------------- /ltc/test_helpers/matchers/be_exactly_nil_matcher.go: -------------------------------------------------------------------------------- 1 | package matchers 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/onsi/gomega/types" 7 | ) 8 | 9 | type exactlyNilMatcher struct{} 10 | 11 | func BeExactlyNil() types.GomegaMatcher { 12 | return &exactlyNilMatcher{} 13 | } 14 | 15 | func (*exactlyNilMatcher) Match(actual interface{}) (success bool, err error) { 16 | if actual == nil { 17 | return true, nil 18 | } else { 19 | return false, nil 20 | } 21 | } 22 | 23 | func (*exactlyNilMatcher) FailureMessage(actual interface{}) (message string) { 24 | return fmt.Sprintf("Expected %v to be exactly nil (not just a nil pointer or some other nil-like thing)", actual) 25 | } 26 | 27 | func (*exactlyNilMatcher) NegatedFailureMessage(actual interface{}) (message string) { 28 | return fmt.Sprintf("Expected %v not to be exactly nil, but it really was nil (not just a nil pointer or some other nil-like thing)!", actual) 29 | } 30 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/cloudfoundry-incubator/receptor/handlers/handlers_suite_test.go: -------------------------------------------------------------------------------- 1 | package handlers_test 2 | 3 | import ( 4 | "bytes" 5 | "encoding/json" 6 | "io" 7 | "net/http" 8 | "strings" 9 | 10 | . "github.com/onsi/ginkgo" 11 | . "github.com/onsi/gomega" 12 | 13 | "testing" 14 | ) 15 | 16 | func TestHandlers(t *testing.T) { 17 | RegisterFailHandler(Fail) 18 | RunSpecs(t, "Handlers Suite") 19 | } 20 | 21 | func newTestRequest(body interface{}) *http.Request { 22 | var reader io.Reader 23 | switch body := body.(type) { 24 | case string: 25 | reader = strings.NewReader(body) 26 | case []byte: 27 | reader = bytes.NewReader(body) 28 | default: 29 | jsonBytes, err := json.Marshal(body) 30 | Ω(err).ShouldNot(HaveOccurred()) 31 | reader = bytes.NewReader(jsonBytes) 32 | } 33 | 34 | request, err := http.NewRequest("", "", reader) 35 | Ω(err).ToNot(HaveOccurred()) 36 | return request 37 | } 38 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/ginkgo/internal/writer/fake_writer.go: -------------------------------------------------------------------------------- 1 | package writer 2 | 3 | type FakeGinkgoWriter struct { 4 | EventStream []string 5 | } 6 | 7 | func NewFake() *FakeGinkgoWriter { 8 | return &FakeGinkgoWriter{ 9 | EventStream: []string{}, 10 | } 11 | } 12 | 13 | func (writer *FakeGinkgoWriter) AddEvent(event string) { 14 | writer.EventStream = append(writer.EventStream, event) 15 | } 16 | 17 | func (writer *FakeGinkgoWriter) Truncate() { 18 | writer.EventStream = append(writer.EventStream, "TRUNCATE") 19 | } 20 | 21 | func (writer *FakeGinkgoWriter) DumpOut() { 22 | writer.EventStream = append(writer.EventStream, "DUMP") 23 | } 24 | 25 | func (writer *FakeGinkgoWriter) DumpOutWithHeader(header string) { 26 | writer.EventStream = append(writer.EventStream, "DUMP_WITH_HEADER: "+header) 27 | } 28 | 29 | func (writer *FakeGinkgoWriter) Write(data []byte) (n int, err error) { 30 | return 0, nil 31 | } 32 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/gomega/README.md: -------------------------------------------------------------------------------- 1 | ![Gomega: Ginkgo's Preferred Matcher Library](http://onsi.github.io/gomega/images/gomega.png) 2 | 3 | [![Build Status](https://travis-ci.org/onsi/gomega.png)](https://travis-ci.org/onsi/gomega) 4 | 5 | Jump straight to the [docs](http://onsi.github.io/gomega/) to learn about Gomega, including a list of [all available matchers](http://onsi.github.io/gomega/#provided-matchers). 6 | 7 | To discuss Gomega and get updates, join the [google group](https://groups.google.com/d/forum/ginkgo-and-gomega). 8 | 9 | ## [Ginkgo](http://github.com/onsi/ginkgo): a BDD Testing Framework for Golang 10 | 11 | Learn more about Ginkgo [here](http://onsi.github.io/ginkgo/) 12 | 13 | ## License 14 | 15 | Gomega is MIT-Licensed 16 | 17 | The `ConsistOf` matcher uses [goraph](https://github.com/amitkgupta/goraph) which is embedded in the source to simplify distribution. goraph has an MIT license. 18 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/pkg/version/version_test.go: -------------------------------------------------------------------------------- 1 | package version 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func assertVersion(t *testing.T, a, b string, result int) { 8 | if r := Version(a).compareTo(Version(b)); r != result { 9 | t.Fatalf("Unexpected version comparison result. Found %d, expected %d", r, result) 10 | } 11 | } 12 | 13 | func TestCompareVersion(t *testing.T) { 14 | assertVersion(t, "1.12", "1.12", 0) 15 | assertVersion(t, "1.0.0", "1", 0) 16 | assertVersion(t, "1", "1.0.0", 0) 17 | assertVersion(t, "1.05.00.0156", "1.0.221.9289", 1) 18 | assertVersion(t, "1", "1.0.1", -1) 19 | assertVersion(t, "1.0.1", "1", 1) 20 | assertVersion(t, "1.0.1", "1.0.2", -1) 21 | assertVersion(t, "1.0.2", "1.0.3", -1) 22 | assertVersion(t, "1.0.3", "1.1", -1) 23 | assertVersion(t, "1.1", "1.1.1", -1) 24 | assertVersion(t, "1.1.1", "1.1.2", -1) 25 | assertVersion(t, "1.1.2", "1.2", -1) 26 | 27 | } 28 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/pivotal-golang/lager/reconfigurable_sink.go: -------------------------------------------------------------------------------- 1 | package lager 2 | 3 | import "sync/atomic" 4 | 5 | type ReconfigurableSink struct { 6 | sink Sink 7 | 8 | minLogLevel int32 9 | } 10 | 11 | func NewReconfigurableSink(sink Sink, initialMinLogLevel LogLevel) *ReconfigurableSink { 12 | return &ReconfigurableSink{ 13 | sink: sink, 14 | 15 | minLogLevel: int32(initialMinLogLevel), 16 | } 17 | } 18 | 19 | func (sink *ReconfigurableSink) Log(level LogLevel, log []byte) { 20 | minLogLevel := LogLevel(atomic.LoadInt32(&sink.minLogLevel)) 21 | 22 | if level < minLogLevel { 23 | return 24 | } 25 | 26 | sink.sink.Log(level, log) 27 | } 28 | 29 | func (sink *ReconfigurableSink) SetMinLevel(level LogLevel) { 30 | atomic.StoreInt32(&sink.minLogLevel, int32(level)) 31 | } 32 | 33 | func (sink *ReconfigurableSink) GetMinLevel() LogLevel { 34 | return LogLevel(atomic.LoadInt32(&sink.minLogLevel)) 35 | } 36 | -------------------------------------------------------------------------------- /ltc/main_test.go: -------------------------------------------------------------------------------- 1 | package main_test 2 | 3 | import ( 4 | "os/exec" 5 | 6 | . "github.com/onsi/ginkgo" 7 | . "github.com/onsi/gomega" 8 | "github.com/onsi/gomega/gbytes" 9 | "github.com/onsi/gomega/gexec" 10 | ) 11 | 12 | var ( 13 | cli string 14 | ) 15 | 16 | var _ = BeforeSuite(func() { 17 | var err error 18 | cli, err = gexec.Build("github.com/cloudfoundry-incubator/lattice/ltc") 19 | Expect(err).ToNot(HaveOccurred()) 20 | }) 21 | 22 | var _ = AfterSuite(func() { 23 | gexec.CleanupBuildArtifacts() 24 | }) 25 | 26 | var _ = Describe("lattice-cli", func() { 27 | It("compiles and displays help text", func() { 28 | command := exec.Command(cli) 29 | 30 | session, err := gexec.Start(command, GinkgoWriter, GinkgoWriter) 31 | 32 | Expect(err).ToNot(HaveOccurred()) 33 | 34 | Eventually(session).Should(gexec.Exit(0)) 35 | Eventually(session.Out).Should(gbytes.Say("ltc - Command line interface for Lattice.")) 36 | }) 37 | }) 38 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/nat/sort_test.go: -------------------------------------------------------------------------------- 1 | package nat 2 | 3 | import ( 4 | "fmt" 5 | "testing" 6 | ) 7 | 8 | func TestSortUniquePorts(t *testing.T) { 9 | ports := []Port{ 10 | Port("6379/tcp"), 11 | Port("22/tcp"), 12 | } 13 | 14 | Sort(ports, func(ip, jp Port) bool { 15 | return ip.Int() < jp.Int() || (ip.Int() == jp.Int() && ip.Proto() == "tcp") 16 | }) 17 | 18 | first := ports[0] 19 | if fmt.Sprint(first) != "22/tcp" { 20 | t.Log(fmt.Sprint(first)) 21 | t.Fail() 22 | } 23 | } 24 | 25 | func TestSortSamePortWithDifferentProto(t *testing.T) { 26 | ports := []Port{ 27 | Port("8888/tcp"), 28 | Port("8888/udp"), 29 | Port("6379/tcp"), 30 | Port("6379/udp"), 31 | } 32 | 33 | Sort(ports, func(ip, jp Port) bool { 34 | return ip.Int() < jp.Int() || (ip.Int() == jp.Int() && ip.Proto() == "tcp") 35 | }) 36 | 37 | first := ports[0] 38 | if fmt.Sprint(first) != "6379/tcp" { 39 | t.Fail() 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar/stat_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux darwin dragonfly freebsd openbsd netbsd solaris 6 | 7 | package tar 8 | 9 | import ( 10 | "os" 11 | "syscall" 12 | ) 13 | 14 | func init() { 15 | sysStat = statUnix 16 | } 17 | 18 | func statUnix(fi os.FileInfo, h *Header) error { 19 | sys, ok := fi.Sys().(*syscall.Stat_t) 20 | if !ok { 21 | return nil 22 | } 23 | h.Uid = int(sys.Uid) 24 | h.Gid = int(sys.Gid) 25 | // TODO(bradfitz): populate username & group. os/user 26 | // doesn't cache LookupId lookups, and lacks group 27 | // lookup functions. 28 | h.AccessTime = statAtime(sys) 29 | h.ChangeTime = statCtime(sys) 30 | // TODO(bradfitz): major/minor device numbers? 31 | return nil 32 | } 33 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/gomega/matchers/succeed_matcher_test.go: -------------------------------------------------------------------------------- 1 | package matchers_test 2 | 3 | import ( 4 | "errors" 5 | 6 | . "github.com/onsi/ginkgo" 7 | . "github.com/onsi/gomega" 8 | . "github.com/onsi/gomega/matchers" 9 | ) 10 | 11 | func Erroring() error { 12 | return errors.New("bam") 13 | } 14 | 15 | func NotErroring() error { 16 | return nil 17 | } 18 | 19 | type AnyType struct{} 20 | 21 | func Invalid() *AnyType { 22 | return nil 23 | } 24 | 25 | var _ = Describe("Succeed", func() { 26 | It("should succeed if the function succeeds", func() { 27 | Ω(NotErroring()).Should(Succeed()) 28 | }) 29 | 30 | It("should succeed (in the negated) if the function errored", func() { 31 | Ω(Erroring()).ShouldNot(Succeed()) 32 | }) 33 | 34 | It("should not if passed a non-error", func() { 35 | success, err := (&SucceedMatcher{}).Match(Invalid()) 36 | Ω(success).Should(BeFalse()) 37 | Ω(err).Should(HaveOccurred()) 38 | }) 39 | }) 40 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/docker/docker/pkg/timeutils/json.go: -------------------------------------------------------------------------------- 1 | package timeutils 2 | 3 | import ( 4 | "errors" 5 | "time" 6 | ) 7 | 8 | const ( 9 | // RFC3339NanoFixed is our own version of RFC339Nano because we want one 10 | // that pads the nano seconds part with zeros to ensure 11 | // the timestamps are aligned in the logs. 12 | RFC3339NanoFixed = "2006-01-02T15:04:05.000000000Z07:00" 13 | // JSONFormat is the format used by FastMarshalJSON 14 | JSONFormat = `"` + time.RFC3339Nano + `"` 15 | ) 16 | 17 | // FastMarshalJSON avoids one of the extra allocations that 18 | // time.MarshalJSON is making. 19 | func FastMarshalJSON(t time.Time) (string, error) { 20 | if y := t.Year(); y < 0 || y >= 10000 { 21 | // RFC 3339 is clear that years are 4 digits exactly. 22 | // See golang.org/issue/4556#c15 for more discussion. 23 | return "", errors.New("time.MarshalJSON: year outside of range [0,9999]") 24 | } 25 | return t.Format(JSONFormat), nil 26 | } 27 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/nsf/termbox-go/syscalls_freebsd.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs syscalls.go 3 | 4 | package termbox 5 | 6 | type syscall_Termios struct { 7 | Iflag uint32 8 | Oflag uint32 9 | Cflag uint32 10 | Lflag uint32 11 | Cc [20]uint8 12 | Ispeed uint32 13 | Ospeed uint32 14 | } 15 | 16 | const ( 17 | syscall_IGNBRK = 0x1 18 | syscall_BRKINT = 0x2 19 | syscall_PARMRK = 0x8 20 | syscall_ISTRIP = 0x20 21 | syscall_INLCR = 0x40 22 | syscall_IGNCR = 0x80 23 | syscall_ICRNL = 0x100 24 | syscall_IXON = 0x200 25 | syscall_OPOST = 0x1 26 | syscall_ECHO = 0x8 27 | syscall_ECHONL = 0x10 28 | syscall_ICANON = 0x100 29 | syscall_ISIG = 0x80 30 | syscall_IEXTEN = 0x400 31 | syscall_CSIZE = 0x300 32 | syscall_PARENB = 0x1000 33 | syscall_CS8 = 0x300 34 | syscall_VMIN = 0x10 35 | syscall_VTIME = 0x11 36 | 37 | syscall_TCGETS = 0x402c7413 38 | syscall_TCSETS = 0x802c7414 39 | ) 40 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/nsf/termbox-go/syscalls_netbsd.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs syscalls.go 3 | 4 | package termbox 5 | 6 | type syscall_Termios struct { 7 | Iflag uint32 8 | Oflag uint32 9 | Cflag uint32 10 | Lflag uint32 11 | Cc [20]uint8 12 | Ispeed int32 13 | Ospeed int32 14 | } 15 | 16 | const ( 17 | syscall_IGNBRK = 0x1 18 | syscall_BRKINT = 0x2 19 | syscall_PARMRK = 0x8 20 | syscall_ISTRIP = 0x20 21 | syscall_INLCR = 0x40 22 | syscall_IGNCR = 0x80 23 | syscall_ICRNL = 0x100 24 | syscall_IXON = 0x200 25 | syscall_OPOST = 0x1 26 | syscall_ECHO = 0x8 27 | syscall_ECHONL = 0x10 28 | syscall_ICANON = 0x100 29 | syscall_ISIG = 0x80 30 | syscall_IEXTEN = 0x400 31 | syscall_CSIZE = 0x300 32 | syscall_PARENB = 0x1000 33 | syscall_CS8 = 0x300 34 | syscall_VMIN = 0x10 35 | syscall_VTIME = 0x11 36 | 37 | syscall_TCGETS = 0x402c7413 38 | syscall_TCSETS = 0x802c7414 39 | ) 40 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/nsf/termbox-go/syscalls_openbsd.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs syscalls.go 3 | 4 | package termbox 5 | 6 | type syscall_Termios struct { 7 | Iflag uint32 8 | Oflag uint32 9 | Cflag uint32 10 | Lflag uint32 11 | Cc [20]uint8 12 | Ispeed int32 13 | Ospeed int32 14 | } 15 | 16 | const ( 17 | syscall_IGNBRK = 0x1 18 | syscall_BRKINT = 0x2 19 | syscall_PARMRK = 0x8 20 | syscall_ISTRIP = 0x20 21 | syscall_INLCR = 0x40 22 | syscall_IGNCR = 0x80 23 | syscall_ICRNL = 0x100 24 | syscall_IXON = 0x200 25 | syscall_OPOST = 0x1 26 | syscall_ECHO = 0x8 27 | syscall_ECHONL = 0x10 28 | syscall_ICANON = 0x100 29 | syscall_ISIG = 0x80 30 | syscall_IEXTEN = 0x400 31 | syscall_CSIZE = 0x300 32 | syscall_PARENB = 0x1000 33 | syscall_CS8 = 0x300 34 | syscall_VMIN = 0x10 35 | syscall_VTIME = 0x11 36 | 37 | syscall_TCGETS = 0x402c7413 38 | syscall_TCSETS = 0x802c7414 39 | ) 40 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/gomega/matchers/have_len_matcher.go: -------------------------------------------------------------------------------- 1 | package matchers 2 | 3 | import ( 4 | "fmt" 5 | "github.com/onsi/gomega/format" 6 | ) 7 | 8 | type HaveLenMatcher struct { 9 | Count int 10 | } 11 | 12 | func (matcher *HaveLenMatcher) Match(actual interface{}) (success bool, err error) { 13 | length, ok := lengthOf(actual) 14 | if !ok { 15 | return false, fmt.Errorf("HaveLen matcher expects a string/array/map/channel/slice. Got:\n%s", format.Object(actual, 1)) 16 | } 17 | 18 | return length == matcher.Count, nil 19 | } 20 | 21 | func (matcher *HaveLenMatcher) FailureMessage(actual interface{}) (message string) { 22 | return fmt.Sprintf("Expected\n%s\nto have length %d", format.Object(actual, 1), matcher.Count) 23 | } 24 | 25 | func (matcher *HaveLenMatcher) NegatedFailureMessage(actual interface{}) (message string) { 26 | return fmt.Sprintf("Expected\n%s\nnot to have length %d", format.Object(actual, 1), matcher.Count) 27 | } 28 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/nsf/termbox-go/syscalls_darwin_386.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs syscalls.go 3 | 4 | package termbox 5 | 6 | type syscall_Termios struct { 7 | Iflag uint32 8 | Oflag uint32 9 | Cflag uint32 10 | Lflag uint32 11 | Cc [20]uint8 12 | Ispeed uint32 13 | Ospeed uint32 14 | } 15 | 16 | const ( 17 | syscall_IGNBRK = 0x1 18 | syscall_BRKINT = 0x2 19 | syscall_PARMRK = 0x8 20 | syscall_ISTRIP = 0x20 21 | syscall_INLCR = 0x40 22 | syscall_IGNCR = 0x80 23 | syscall_ICRNL = 0x100 24 | syscall_IXON = 0x200 25 | syscall_OPOST = 0x1 26 | syscall_ECHO = 0x8 27 | syscall_ECHONL = 0x10 28 | syscall_ICANON = 0x100 29 | syscall_ISIG = 0x80 30 | syscall_IEXTEN = 0x400 31 | syscall_CSIZE = 0x300 32 | syscall_PARENB = 0x1000 33 | syscall_CS8 = 0x300 34 | syscall_VMIN = 0x10 35 | syscall_VTIME = 0x11 36 | 37 | syscall_TCGETS = 0x402c7413 38 | syscall_TCSETS = 0x802c7414 39 | ) 40 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/gizak/termui/example/list.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 Zack Guo . All rights reserved. 2 | // Use of this source code is governed by a MIT license that can 3 | // be found in the LICENSE file. 4 | 5 | // +build ignore 6 | 7 | package main 8 | 9 | import "github.com/gizak/termui" 10 | 11 | func main() { 12 | err := termui.Init() 13 | if err != nil { 14 | panic(err) 15 | } 16 | defer termui.Close() 17 | 18 | termui.UseTheme("helloworld") 19 | 20 | strs := []string{ 21 | "[0] github.com/gizak/termui", 22 | "[1] 你好,世界", 23 | "[2] こんにちは世界", 24 | "[3] keyboard.go", 25 | "[4] output.go", 26 | "[5] random_out.go", 27 | "[6] dashboard.go", 28 | "[7] nsf/termbox-go"} 29 | 30 | ls := termui.NewList() 31 | ls.Items = strs 32 | ls.ItemFgColor = termui.ColorYellow 33 | ls.Border.Label = "List" 34 | ls.Height = 7 35 | ls.Width = 25 36 | ls.Y = 0 37 | 38 | termui.Render(ls) 39 | 40 | <-termui.EventCh() 41 | } 42 | -------------------------------------------------------------------------------- /cluster/scripts/install-brain: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | lattice_version=$(< /var/lattice/LATTICE_VERSION) 6 | 7 | echo "Installing Lattice ($lattice_version) - Brain" 8 | 9 | lattice_brain_path=/tmp/lattice-build/brain 10 | 11 | cp -v $lattice_brain_path/upstart/* /etc/init 12 | cp -v $lattice_brain_path/bin/* /usr/local/bin 13 | cp -av $lattice_brain_path/brain_health_check /var/lattice 14 | 15 | mkdir -pv /var/lattice/static-files 16 | 17 | pushd $lattice_brain_path/bin > /dev/null 18 | tar -cvzf /var/lattice/static-files/healthcheck.tgz healthcheck 19 | popd > /dev/null 20 | 21 | mkdir -pv /var/lattice/config 22 | cp -av $lattice_brain_path/config /var/lattice 23 | 24 | mkdir -pv /var/lattice/setup 25 | cp -av $lattice_brain_path/setup /var/lattice 26 | 27 | mkdir -pv /var/lattice/run 28 | mkdir -pv /var/lattice/log 29 | 30 | start bootstrap &>> /var/lattice/log/brain-bootstrap.log 31 | 32 | echo "Finished Installing Lattice Brain ($lattice_version)!" 33 | 34 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/Sirupsen/logrus/examples/basic/basic.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "github.com/Sirupsen/logrus" 5 | ) 6 | 7 | var log = logrus.New() 8 | 9 | func init() { 10 | log.Formatter = new(logrus.JSONFormatter) 11 | log.Formatter = new(logrus.TextFormatter) // default 12 | } 13 | 14 | func main() { 15 | defer func() { 16 | err := recover() 17 | if err != nil { 18 | log.WithFields(logrus.Fields{ 19 | "omg": true, 20 | "err": err, 21 | "number": 100, 22 | }).Fatal("The ice breaks!") 23 | } 24 | }() 25 | 26 | log.WithFields(logrus.Fields{ 27 | "animal": "walrus", 28 | "size": 10, 29 | }).Info("A group of walrus emerges from the ocean") 30 | 31 | log.WithFields(logrus.Fields{ 32 | "omg": true, 33 | "number": 122, 34 | }).Warn("The group's number increased tremendously!") 35 | 36 | log.WithFields(logrus.Fields{ 37 | "animal": "orca", 38 | "size": 9009, 39 | }).Panic("It's over 9000!") 40 | } 41 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/onsi/ginkgo/ginkgo/unfocus_command.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "flag" 5 | "fmt" 6 | "os/exec" 7 | ) 8 | 9 | func BuildUnfocusCommand() *Command { 10 | return &Command{ 11 | Name: "unfocus", 12 | AltName: "blur", 13 | FlagSet: flag.NewFlagSet("unfocus", flag.ExitOnError), 14 | UsageCommand: "ginkgo unfocus (or ginkgo blur)", 15 | Usage: []string{ 16 | "Recursively unfocuses any focused tests under the current directory", 17 | }, 18 | Command: unfocusSpecs, 19 | } 20 | } 21 | 22 | func unfocusSpecs([]string, []string) { 23 | unfocus("Describe") 24 | unfocus("Context") 25 | unfocus("It") 26 | unfocus("Measure") 27 | } 28 | 29 | func unfocus(component string) { 30 | fmt.Printf("Removing F%s...\n", component) 31 | cmd := exec.Command("gofmt", fmt.Sprintf("-r=F%s -> %s", component, component), "-w", ".") 32 | out, _ := cmd.CombinedOutput() 33 | if string(out) != "" { 34 | println(string(out)) 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /ltc/Godeps/_workspace/src/github.com/nsf/termbox-go/syscalls.go: -------------------------------------------------------------------------------- 1 | // +build ignore 2 | 3 | package termbox 4 | 5 | /* 6 | #include 7 | #include 8 | */ 9 | import "C" 10 | 11 | type syscall_Termios C.struct_termios 12 | 13 | const ( 14 | syscall_IGNBRK = C.IGNBRK 15 | syscall_BRKINT = C.BRKINT 16 | syscall_PARMRK = C.PARMRK 17 | syscall_ISTRIP = C.ISTRIP 18 | syscall_INLCR = C.INLCR 19 | syscall_IGNCR = C.IGNCR 20 | syscall_ICRNL = C.ICRNL 21 | syscall_IXON = C.IXON 22 | syscall_OPOST = C.OPOST 23 | syscall_ECHO = C.ECHO 24 | syscall_ECHONL = C.ECHONL 25 | syscall_ICANON = C.ICANON 26 | syscall_ISIG = C.ISIG 27 | syscall_IEXTEN = C.IEXTEN 28 | syscall_CSIZE = C.CSIZE 29 | syscall_PARENB = C.PARENB 30 | syscall_CS8 = C.CS8 31 | syscall_VMIN = C.VMIN 32 | syscall_VTIME = C.VTIME 33 | 34 | // on darwin change these to (on *bsd too?): 35 | // C.TIOCGETA 36 | // C.TIOCSETA 37 | syscall_TCGETS = C.TCGETS 38 | syscall_TCSETS = C.TCSETS 39 | ) 40 | -------------------------------------------------------------------------------- /ltc/config/persister/file_persister.go: -------------------------------------------------------------------------------- 1 | package persister 2 | 3 | import ( 4 | "encoding/json" 5 | "io/ioutil" 6 | "os" 7 | "path/filepath" 8 | ) 9 | 10 | type filePersister struct { 11 | filePath string 12 | } 13 | 14 | func NewFilePersister(filepath string) Persister { 15 | return &filePersister{filepath} 16 | } 17 | 18 | func (f *filePersister) Load(i interface{}) error { 19 | jsonBytes, err := ioutil.ReadFile(f.filePath) 20 | if err != nil { 21 | return nil 22 | } 23 | 24 | err = json.Unmarshal(jsonBytes, i) 25 | if err != nil { 26 | return err 27 | } 28 | 29 | return nil 30 | } 31 | 32 | func (f *filePersister) Save(i interface{}) error { 33 | err := os.MkdirAll(filepath.Dir(f.filePath), 0700) 34 | if err != nil { 35 | return err 36 | } 37 | 38 | jsonBytes, err := json.Marshal(i) 39 | if err != nil { 40 | return err 41 | } 42 | 43 | err = ioutil.WriteFile(f.filePath, jsonBytes, 0700) 44 | if err != nil { 45 | return err 46 | } 47 | 48 | return nil 49 | } 50 | --------------------------------------------------------------------------------