In this recipe, we will learn how frameworks register in Mesos to receive offers and state updates.
Registering frameworks
How to do it...
We will create the scheduler.go file and implement our framework inside of it.
Before we start, we need to define some globals and imports that we will need later:
import (
"bufio"
"bytes"
"log"
"net/http"
"os"
"strconv"
"strings"
"github.com/golang/protobuf/jsonpb"
)
// Url to Mesos master scheduler API
const schedulerApiUrl = "http://10.10.10.10:5050/api/v1/scheduler"
// Current framework configuration
var frameworkInfo FrameworkInfo
// Marshaler...