diff options
Diffstat (limited to 'structs.go')
| -rw-r--r-- | structs.go | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -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() +} |
