forked from hswaw/hscloud
hswaw/capacifier: remove mirko dependency
Change-Id: I3afbe1857c321ac6db1255d8a2fe1d9aa3da5c12 Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1689 Reviewed-by: q3k <q3k@hackerspace.pl>
This commit is contained in:
parent
3ca8454555
commit
d318d7e6d4
2 changed files with 4 additions and 12 deletions
|
@ -7,7 +7,6 @@ go_library(
|
|||
importpath = "code.hackerspace.pl/hscloud/hswaw/capacifier",
|
||||
visibility = ["//visibility:private"],
|
||||
deps = [
|
||||
"//go/mirko",
|
||||
"@com_github_go_ldap_ldap_v3//:ldap",
|
||||
"@com_github_golang_glog//:glog",
|
||||
],
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"crypto/tls"
|
||||
"flag"
|
||||
"fmt"
|
||||
|
@ -11,8 +12,6 @@ import (
|
|||
|
||||
ldap "github.com/go-ldap/ldap/v3"
|
||||
"github.com/golang/glog"
|
||||
|
||||
"code.hackerspace.pl/hscloud/go/mirko"
|
||||
)
|
||||
|
||||
type server struct {
|
||||
|
@ -179,10 +178,8 @@ func main() {
|
|||
glog.Exitf("-ldap_bind_pw must be set")
|
||||
}
|
||||
|
||||
m := mirko.New()
|
||||
if err := m.Listen(); err != nil {
|
||||
glog.Exitf("Listen(): %v", err)
|
||||
}
|
||||
// TODO(q3k): use sigint-interruptible context
|
||||
ctx := context.Background()
|
||||
|
||||
s := &server{}
|
||||
mux := http.NewServeMux()
|
||||
|
@ -195,9 +192,5 @@ func main() {
|
|||
}
|
||||
}()
|
||||
|
||||
if err := m.Serve(); err != nil {
|
||||
glog.Exitf("Serve(): %v", err)
|
||||
}
|
||||
|
||||
<-m.Done()
|
||||
<-ctx.Done()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue