summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go40
1 files changed, 40 insertions, 0 deletions
diff --git a/main.go b/main.go
new file mode 100644
index 0000000..b47df4c
--- /dev/null
+++ b/main.go
@@ -0,0 +1,40 @@
+package main
+
+import (
+ "time"
+)
+
+var ch chan string
+
+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"
+}