From 90fee5d56ff41a01e4de870a5fe78c8ebfcf012f Mon Sep 17 00:00:00 2001 From: sayden Date: Fri, 27 May 2016 12:42:04 +0200 Subject: [PATCH] Main updated to add Executor URL as a flag in command line. Readme updated accordingly --- README.md | 13 ++++++------- main.go | 6 +++--- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 0232808..9f6914e 100644 --- a/README.md +++ b/README.md @@ -49,13 +49,12 @@ To recall: ### Filling Executor information ```go -// URIs -executorUri := "http://s3-eu-west-1.amazonaws.com/enablers/executor" +//ExecutorInfo executorUris := []*mesosproto.CommandInfo_URI{ - { - Value: &executorUri, - Executable: proto.Bool(true), - }, + { + Value: executorUri, + Executable: proto.Bool(true), + }, } //Info @@ -324,7 +323,7 @@ To finish our Scheduler, we have to fill a `mesosproto.FrameworkInfo` object: //Framework frameworkInfo := &mesosproto.FrameworkInfo{ User: proto.String("root"), // Mesos-go will fill in user. - Name: proto.String("Stratio Server Framework (Go)"), + Name: proto.String("Web Server Framework (Go)"), } ``` diff --git a/main.go b/main.go index 6dc2a3c..ccf9d64 100644 --- a/main.go +++ b/main.go @@ -16,6 +16,7 @@ import ( var ( master = flag.String("master", "127.0.0.1:5050", "Master address ") + executorUri = flag.String("executor", "127.0.0.1:8080/executor", "Url to download the executor from") ) func init() { @@ -24,10 +25,9 @@ func init() { func main() { //ExecutorInfo - executorUri := "http://s3-eu-west-1.amazonaws.com/enablers/executor" executorUris := []*mesosproto.CommandInfo_URI{ { - Value: &executorUri, + Value: executorUri, Executable: proto.Bool(true), }, } @@ -52,7 +52,7 @@ func main() { //Framework frameworkInfo := &mesosproto.FrameworkInfo{ User: proto.String("root"), // Mesos-go will fill in user. - Name: proto.String("Stratio Server Framework (Go)"), + Name: proto.String("Web Server Framework (Go)"), } //Scheduler Driver