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