tui

package module
v0.0.0-...-32e3e1b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StringWriter

type StringWriter struct {
	// contains filtered or unexported fields
}

StringWriter implements the io.Writer interface by writing to a channel

func (StringWriter) Write

func (sw StringWriter) Write(p []byte) (n int, err error)

type TUI

type TUI struct {
	// logging
	L       *zap.Logger // handle for main app logger
	Logfile string      // log file path

	ConnLogC chan string // channel for redirecting connection history log

	HPClientMap *map[string]punch.ClientData // connection to HPServer/HPclient's client list
	// changeClientMap map[string]punch.ClientData
	// numClients int
	UIupdate       bool
	ClientUIStage2 bool

	// bind HPClient
	HPClient *punch.HPClient

	//todo: bind udptunnel tunnel info
	TunnelMan *tunnel.TunnelManager

	// -- client only
	// activeTunnels *tview.TreeView
	// -- server only
	ConnLogs *tview.TextView
	// contains filtered or unexported fields
}

func Start

func Start(serverMode bool) *TUI

func (*TUI) Build

func (t *TUI) Build()

func (*TUI) ConnectClientList

func (t *TUI) ConnectClientList(m *map[string]punch.ClientData)

Client list linking functions

func (*TUI) ConnectHPClient

func (t *TUI) ConnectHPClient(c *punch.HPClient)

HPClient linking functions

func (*TUI) ConnectTunMan

func (t *TUI) ConnectTunMan(m *tunnel.TunnelManager)

todo: Tunnel Manager linking functions

func (*TUI) RunApp

func (t *TUI) RunApp()

Run TUI handler

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL