summaryrefslogtreecommitdiff
path: root/structs.go
diff options
context:
space:
mode:
Diffstat (limited to 'structs.go')
-rw-r--r--structs.go25
1 files changed, 25 insertions, 0 deletions
diff --git a/structs.go b/structs.go
index eab8923..1cf6370 100644
--- a/structs.go
+++ b/structs.go
@@ -4,13 +4,20 @@
package main
import (
+ sync "sync"
"time"
+
+ "go.wit.com/gui"
+ "go.wit.com/lib/gadgets"
)
var me *gusconf
// this app's variables
type gusconf struct {
+ myGui *gui.Node // the base of the gui
+ portmaps *Portmaps // the portmap window
+ portwin *stdTableWin // the portwin window
urlbase string // the dns name for the zookeeper
hostname string // my hostname
pollDelay time.Duration // how often to report our status
@@ -18,3 +25,21 @@ type gusconf struct {
failcount int // how many times we've failed to contact the zookeeper
failcountmax int // after this, exit and let systemd restart the daemon
}
+
+type stdTableWin struct {
+ sync.Mutex
+ win *gadgets.GenericWindow // the machines gui window
+ box *gui.Node // the machines gui parent box widget
+ TB *PortmapsTable // the gui table buffer
+ update bool // if the window should be updated
+}
+
+func (w *stdTableWin) Toggle() {
+ if w == nil {
+ return
+ }
+ if w.win == nil {
+ return
+ }
+ w.win.Toggle()
+}