diff options
| author | Jeff Carr <[email protected]> | 2025-03-10 06:53:30 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-03-10 07:59:25 -0500 |
| commit | 22d07987494113dc85542b753c3ecc7e9db37511 (patch) | |
| tree | a76bb478607a1edc58390497103a84312a7c6359 /structs.go | |
| parent | 2e10a2a0d96da83838dfab34015595b05dcc9058 (diff) | |
events table
Diffstat (limited to 'structs.go')
| -rw-r--r-- | structs.go | 39 |
1 files changed, 29 insertions, 10 deletions
@@ -15,16 +15,17 @@ var me *gusconf // this app's variables type gusconf struct { - myGui *gui.Node // the base of the gui - portmaps *Portmaps // the portmap window - events *Events // the event log - 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 - dog *time.Ticker // the watchdog timer - failcount int // how many times we've failed to contact the zookeeper - failcountmax int // after this, exit and let systemd restart the daemon + myGui *gui.Node // the base of the gui + portmaps *Portmaps // the portmap window + events *Events // the event log + portwin *stdTableWin // the portwin window + eventswin *stdEventTableWin // the event window + urlbase string // the dns name for the zookeeper + hostname string // my hostname + pollDelay time.Duration // how often to report our status + dog *time.Ticker // the watchdog timer + 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 { @@ -44,3 +45,21 @@ func (w *stdTableWin) Toggle() { } w.win.Toggle() } + +type stdEventTableWin struct { + sync.Mutex + win *gadgets.GenericWindow // the machines gui window + box *gui.Node // the machines gui parent box widget + TB *EventsTable // the gui table buffer + update bool // if the window should be updated +} + +func (w *stdEventTableWin) Toggle() { + if w == nil { + return + } + if w.win == nil { + return + } + w.win.Toggle() +} |
