examples/

directory
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2017 License: Apache-2.0

README

Examples

Building

$ go get github.com/tools/godep
$ make

Running

Start Mesos

You will need a running Mesos master and slaves to run the examples. For instance, start a local Mesos:

$ <mesos-build-install>/bin/mesos-local --ip=127.0.0.1 --port=5050 --roles=golang

See http://mesos.apache.org/gettingstarted/ for getting started with Apache Mesos.

Start the Go scheduler/executor examples
$ export EXECUTOR_BIN=$(pwd)/_output/executor
$ ./_output/scheduler -master=127.0.0.1:5050 -executor="$EXECUTOR_BIN" -logtostderr=true

If all goes well, you should see output about task completion. You can also point your browser to the Mesos GUI http://127.0.0.1:5050/ to validate the framework activities.

Start the Go scheduler with other executors

You can also use the Go example-scheduler with executors written in other languages such as Python or Java for further validation (note: to use these executors requires a build of the mesos source code with make check):

$ ./_output/scheduler -master=127.0.0.1:5050 -executor="<mesos-build>/src/examples/python/test-executor" -logtostderr=true

Similarly for the Java version:

$ ./_output/scheduler -master=127.0.0.1:5050 -executor="<mesos-build>/src/examples/java/test-executor" -logtostderr=true
Start the Go persistent scheduler/executor examples
$ export EXECUTOR_BIN=$(pwd)/_output/executor
$ ./_output/persistent_scheduler -master=127.0.0.1:5050 -executor="$EXECUTOR_BIN" -logtostderr=true -role=golang -mesos_authentication_principal=golang

Directories

Path Synopsis
Godeps
_workspace/src/github.com/gogo/protobuf/proto
Package proto converts data structures to and from the wire format of protocol buffers.
Package proto converts data structures to and from the wire format of protocol buffers.
_workspace/src/github.com/gogo/protobuf/proto/proto3_proto
Package proto3_proto is a generated protocol buffer package.
Package proto3_proto is a generated protocol buffer package.
_workspace/src/github.com/golang/glog
Package glog implements logging analogous to the Google-internal C++ INFO/ERROR/V setup.
Package glog implements logging analogous to the Google-internal C++ INFO/ERROR/V setup.
_workspace/src/github.com/pborman/uuid
The uuid package generates and inspects UUIDs.
The uuid package generates and inspects UUIDs.
_workspace/src/github.com/stretchr/objx
objx - Go package for dealing with maps, slices, JSON and other data.
objx - Go package for dealing with maps, slices, JSON and other data.
_workspace/src/github.com/stretchr/testify/assert
Package assert provides a set of comprehensive testing tools for use with the normal Go testing system.
Package assert provides a set of comprehensive testing tools for use with the normal Go testing system.
_workspace/src/github.com/stretchr/testify/mock
Provides a system by which it is possible to mock your objects and verify calls are happening as expected.
Provides a system by which it is possible to mock your objects and verify calls are happening as expected.
_workspace/src/golang.org/x/net/context
Package context defines the Context type, which carries deadlines, cancelation signals, and other request-scoped values across API boundaries and between processes.
Package context defines the Context type, which carries deadlines, cancelation signals, and other request-scoped values across API boundaries and between processes.
_workspace/src/golang.org/x/net/context/ctxhttp
Package ctxhttp provides helper functions for performing context-aware HTTP requests.
Package ctxhttp provides helper functions for performing context-aware HTTP requests.

Jump to

Keyboard shortcuts

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