blob: b47df4c8a802649cdf7d959bbece04f250d4148a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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"
}
|