summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2018-01-19 19:51:03 +0100
committerRuben Pollan <meskio@sindominio.net>2018-01-19 19:51:03 +0100
commit96a892f8400bc60a3a4021d7783776e2315036ba (patch)
tree50c3129c7d8a8724c6233a644de09b050bf265ac /main.go
parent56b9c951111a4627cd5d9f5d8e72623a0c8ecb57 (diff)
[feat] implement bitmask.core zmq comunication
Diffstat (limited to 'main.go')
-rw-r--r--main.go41
1 files changed, 11 insertions, 30 deletions
diff --git a/main.go b/main.go
index b47df4c..ddf7172 100644
--- a/main.go
+++ b/main.go
@@ -1,40 +1,21 @@
package main
import (
- "time"
+ "log"
+
+ "0xacab.org/meskio/bitmask-systray/bitmask"
)
-var ch chan string
+const (
+ provider = "demo.bitmask.net"
+)
func main() {
go notificate()
- ch = make(chan string)
- run(ch)
-}
-
-func startVPN() {
- go func() {
- ch <- "starting"
- time.Sleep(time.Second * 5)
- ch <- "on"
- }()
-}
-
-func cancelVPN() {
- go func() {
- ch <- "stopping"
- time.Sleep(time.Second * 5)
- ch <- "off"
- }()
-}
-
-func stopVPN() {
- go func() {
- ch <- "failed"
- }()
-}
-
-func getVPNStatus() string {
- return "off"
+ b, err := bitmask.Init()
+ if err != nil {
+ log.Fatal(err)
+ }
+ run(b)
}