Runing goimports on project as well as fixing README so that headers render correctly.

This commit is contained in:
Renan DelValle 2018-09-30 18:23:38 -07:00
parent b341c0a0e4
commit 9554bf2666
No known key found for this signature in database
GPG key ID: 3895800E03F17676
22 changed files with 90 additions and 71 deletions

View file

@ -1,12 +1,13 @@
package def
import (
"gitlab.com/spdf/elektron/constants"
"gitlab.com/spdf/elektron/utilities/offerUtils"
"encoding/json"
"os"
mesos "github.com/mesos/mesos-go/api/v0/mesosproto"
"github.com/pkg/errors"
"os"
"gitlab.com/spdf/elektron/constants"
"gitlab.com/spdf/elektron/utilities/offerUtils"
)
type Task struct {

View file

@ -3,10 +3,11 @@ package def
import (
"errors"
"fmt"
"github.com/mash/gokmeans"
"github.com/montanaflynn/stats"
"log"
"sort"
"github.com/mash/gokmeans"
"github.com/montanaflynn/stats"
)
// Information about a cluster of tasks.

View file

@ -1,9 +1,10 @@
package logging
import (
logUtils "gitlab.com/spdf/elektron/logging/utils"
"strings"
"time"
logUtils "gitlab.com/spdf/elektron/logging/utils"
)
// Names of different loggers

View file

@ -1,16 +1,17 @@
package pcp
import (
elecLogDef "gitlab.com/spdf/elektron/logging/def"
"gitlab.com/spdf/elektron/schedulers"
"bufio"
"fmt"
"github.com/mesos/mesos-go/api/v0/scheduler"
"github.com/montanaflynn/stats"
"log"
"os/exec"
"syscall"
"time"
"github.com/mesos/mesos-go/api/v0/scheduler"
"github.com/montanaflynn/stats"
elecLogDef "gitlab.com/spdf/elektron/logging/def"
"gitlab.com/spdf/elektron/schedulers"
)
func Start(quit chan struct{}, logging *bool, logMType chan elecLogDef.LogMessageType, logMsg chan string, s scheduler.Scheduler) {

View file

@ -1,9 +1,6 @@
package pcp
import (
elecLogDef "gitlab.com/spdf/elektron/logging/def"
"gitlab.com/spdf/elektron/pcp"
"gitlab.com/spdf/elektron/rapl"
"bufio"
"container/ring"
"fmt"
@ -14,6 +11,10 @@ import (
"strings"
"syscall"
"time"
elecLogDef "gitlab.com/spdf/elektron/logging/def"
"gitlab.com/spdf/elektron/pcp"
"gitlab.com/spdf/elektron/rapl"
)
func StartPCPLogAndExtremaDynamicCap(quit chan struct{}, logging *bool, hiThreshold, loThreshold float64,

View file

@ -1,11 +1,6 @@
package pcp
import (
"gitlab.com/spdf/elektron/constants"
elecLogDef "gitlab.com/spdf/elektron/logging/def"
"gitlab.com/spdf/elektron/pcp"
"gitlab.com/spdf/elektron/rapl"
"gitlab.com/spdf/elektron/utilities"
"bufio"
"container/ring"
"fmt"
@ -17,6 +12,12 @@ import (
"strings"
"syscall"
"time"
"gitlab.com/spdf/elektron/constants"
elecLogDef "gitlab.com/spdf/elektron/logging/def"
"gitlab.com/spdf/elektron/pcp"
"gitlab.com/spdf/elektron/rapl"
"gitlab.com/spdf/elektron/utilities"
)
func round(num float64) int {

View file

@ -1,11 +1,12 @@
package rapl
import (
elekEnv "gitlab.com/spdf/elektron/environment"
"github.com/pkg/errors"
"golang.org/x/crypto/ssh"
"os"
"strconv"
"github.com/pkg/errors"
elekEnv "gitlab.com/spdf/elektron/environment"
"golang.org/x/crypto/ssh"
)
func Cap(host, username string, percentage float64) error {

View file

@ -1,20 +1,21 @@
package main
import (
"gitlab.com/spdf/elektron/def"
elecLogDef "gitlab.com/spdf/elektron/logging/def"
"gitlab.com/spdf/elektron/pcp"
"gitlab.com/spdf/elektron/schedulers"
"flag"
"fmt"
"github.com/golang/protobuf/proto"
mesos "github.com/mesos/mesos-go/api/v0/mesosproto"
sched "github.com/mesos/mesos-go/api/v0/scheduler"
"log"
"os"
"os/signal"
"strings"
"time"
"github.com/golang/protobuf/proto"
mesos "github.com/mesos/mesos-go/api/v0/mesosproto"
sched "github.com/mesos/mesos-go/api/v0/scheduler"
"gitlab.com/spdf/elektron/def"
elecLogDef "gitlab.com/spdf/elektron/logging/def"
"gitlab.com/spdf/elektron/pcp"
"gitlab.com/spdf/elektron/schedulers"
)
var master = flag.String("master", "", "Location of leading Mesos master -- <mesos-master>:<port>")

View file

@ -1,12 +1,13 @@
package schedulers
import (
"log"
mesos "github.com/mesos/mesos-go/api/v0/mesosproto"
sched "github.com/mesos/mesos-go/api/v0/scheduler"
"gitlab.com/spdf/elektron/def"
"gitlab.com/spdf/elektron/utilities/mesosUtils"
"gitlab.com/spdf/elektron/utilities/offerUtils"
mesos "github.com/mesos/mesos-go/api/v0/mesosproto"
sched "github.com/mesos/mesos-go/api/v0/scheduler"
"log"
)
// Decides if to take an offer or not

View file

@ -1,12 +1,13 @@
package schedulers
import (
"log"
mesos "github.com/mesos/mesos-go/api/v0/mesosproto"
sched "github.com/mesos/mesos-go/api/v0/scheduler"
"gitlab.com/spdf/elektron/def"
"gitlab.com/spdf/elektron/utilities/mesosUtils"
"gitlab.com/spdf/elektron/utilities/offerUtils"
mesos "github.com/mesos/mesos-go/api/v0/mesosproto"
sched "github.com/mesos/mesos-go/api/v0/scheduler"
"log"
)
// Decides if to take an offer or not

View file

@ -1,19 +1,20 @@
package schedulers
import (
"gitlab.com/spdf/elektron/def"
elecLogDef "gitlab.com/spdf/elektron/logging/def"
"gitlab.com/spdf/elektron/utilities"
"gitlab.com/spdf/elektron/utilities/schedUtils"
"bytes"
"fmt"
"log"
"sync"
"time"
"github.com/golang/protobuf/proto"
mesos "github.com/mesos/mesos-go/api/v0/mesosproto"
"github.com/mesos/mesos-go/api/v0/mesosutil"
sched "github.com/mesos/mesos-go/api/v0/scheduler"
"log"
"sync"
"time"
"gitlab.com/spdf/elektron/def"
elecLogDef "gitlab.com/spdf/elektron/logging/def"
"gitlab.com/spdf/elektron/utilities"
"gitlab.com/spdf/elektron/utilities/schedUtils"
)
type BaseScheduler struct {

View file

@ -1,12 +1,13 @@
package schedulers
import (
"log"
mesos "github.com/mesos/mesos-go/api/v0/mesosproto"
sched "github.com/mesos/mesos-go/api/v0/scheduler"
"gitlab.com/spdf/elektron/def"
"gitlab.com/spdf/elektron/utilities/mesosUtils"
"gitlab.com/spdf/elektron/utilities/offerUtils"
mesos "github.com/mesos/mesos-go/api/v0/mesosproto"
sched "github.com/mesos/mesos-go/api/v0/scheduler"
"log"
)
// Decides if to take an offer or not

View file

@ -1,11 +1,12 @@
package schedulers
import (
"gitlab.com/spdf/elektron/def"
elecLogDef "gitlab.com/spdf/elektron/logging/def"
"time"
mesos "github.com/mesos/mesos-go/api/v0/mesosproto"
sched "github.com/mesos/mesos-go/api/v0/scheduler"
"time"
"gitlab.com/spdf/elektron/def"
elecLogDef "gitlab.com/spdf/elektron/logging/def"
)
// Implements mesos scheduler.

View file

@ -1,11 +1,11 @@
package schedulers
import (
mesos "github.com/mesos/mesos-go/api/v0/mesosproto"
sched "github.com/mesos/mesos-go/api/v0/scheduler"
"gitlab.com/spdf/elektron/def"
"gitlab.com/spdf/elektron/utilities/mesosUtils"
"gitlab.com/spdf/elektron/utilities/offerUtils"
mesos "github.com/mesos/mesos-go/api/v0/mesosproto"
sched "github.com/mesos/mesos-go/api/v0/scheduler"
)
// Decides if to take an offer or not

View file

@ -1,14 +1,14 @@
package schedulers
import (
mesos "github.com/mesos/mesos-go/api/v0/mesosproto"
sched "github.com/mesos/mesos-go/api/v0/scheduler"
"github.com/pkg/errors"
"gitlab.com/spdf/elektron/constants"
"gitlab.com/spdf/elektron/def"
elecLogDef "gitlab.com/spdf/elektron/logging/def"
"gitlab.com/spdf/elektron/utilities"
"gitlab.com/spdf/elektron/utilities/mesosUtils"
mesos "github.com/mesos/mesos-go/api/v0/mesosproto"
sched "github.com/mesos/mesos-go/api/v0/scheduler"
"github.com/pkg/errors"
)
func coLocated(tasks map[string]bool, s BaseScheduler) {

View file

@ -1,13 +1,14 @@
package schedulers
import (
"gitlab.com/spdf/elektron/def"
elecLogDef "gitlab.com/spdf/elektron/logging/def"
"fmt"
mesos "github.com/mesos/mesos-go/api/v0/mesosproto"
sched "github.com/mesos/mesos-go/api/v0/scheduler"
"log"
"time"
mesos "github.com/mesos/mesos-go/api/v0/mesosproto"
sched "github.com/mesos/mesos-go/api/v0/scheduler"
"gitlab.com/spdf/elektron/def"
elecLogDef "gitlab.com/spdf/elektron/logging/def"
)
type SchedPolicyContext interface {

View file

@ -2,6 +2,7 @@ package schedulers
import (
"fmt"
mesos "github.com/mesos/mesos-go/api/v0/mesosproto"
)

View file

@ -1,12 +1,13 @@
package schedulers
import (
"gitlab.com/spdf/elektron/utilities"
"encoding/json"
sched "github.com/mesos/mesos-go/api/v0/scheduler"
"github.com/pkg/errors"
"os"
"sort"
sched "github.com/mesos/mesos-go/api/v0/scheduler"
"github.com/pkg/errors"
"gitlab.com/spdf/elektron/utilities"
)
// Names of different scheduling policies.

View file

@ -1,10 +1,11 @@
package offerUtils
import (
"gitlab.com/spdf/elektron/constants"
mesos "github.com/mesos/mesos-go/api/v0/mesosproto"
"log"
"strings"
mesos "github.com/mesos/mesos-go/api/v0/mesosproto"
"gitlab.com/spdf/elektron/constants"
)
func OfferAgg(offer *mesos.Offer) (float64, float64, float64) {

View file

@ -1,9 +1,10 @@
package schedUtils
import (
"log"
"gitlab.com/spdf/elektron/def"
"gitlab.com/spdf/elektron/utilities"
"log"
)
// Criteria for resizing the scheduling window.

View file

@ -1,11 +1,12 @@
package utilities
import (
"errors"
"sync"
mesos "github.com/mesos/mesos-go/api/v0/mesosproto"
"gitlab.com/spdf/elektron/def"
"gitlab.com/spdf/elektron/utilities/offerUtils"
"errors"
mesos "github.com/mesos/mesos-go/api/v0/mesosproto"
"sync"
)
type TrackResourceUsage struct {