diff options
author | Nick White <git@njw.name> | 2020-04-21 10:43:40 +0100 |
---|---|---|
committer | Nick White <git@njw.name> | 2020-04-21 10:43:40 +0100 |
commit | 72140e49a867e1582e3e8d9ee1e4354598669b79 (patch) | |
tree | d49c7b8a24d3260455fdbfca91cbd42b3acd407f /cmd/spotme | |
parent | 1acb120a0a79434c5726935c3b3f57595b354496 (diff) |
Simplify spotme
Diffstat (limited to 'cmd/spotme')
-rw-r--r-- | cmd/spotme/main.go | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/cmd/spotme/main.go b/cmd/spotme/main.go index 1f7969d..91ccaea 100644 --- a/cmd/spotme/main.go +++ b/cmd/spotme/main.go @@ -19,17 +19,10 @@ Create new spot instances for the book pipeline. ` type SpotPipeliner interface { - Init() error + MinimalInit() error StartInstances(n int) error } -// NullWriter is used so non-verbose logging may be discarded -type NullWriter bool - -func (w NullWriter) Write(p []byte) (n int, err error) { - return len(p), nil -} - func main() { num := flag.Int("n", 1, "number of instances to start") flag.Usage = func() { @@ -38,13 +31,9 @@ func main() { } flag.Parse() - var verboselog *log.Logger - var n NullWriter - verboselog = log.New(n, "", 0) - var conn SpotPipeliner - conn = &bookpipeline.AwsConn{Region: "eu-west-2", Logger: verboselog} - err := conn.Init() + conn = &bookpipeline.AwsConn{} + err := conn.MinimalInit() if err != nil { log.Fatalln("Failed to set up cloud connection:", err) } |