ui

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: GPL-3.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UI_MESSAGES_CHANNEL_BUFFERSIZE = 32
	PUBSUB_MESSAGES_BUFFERSIZE     = 32
)
View Source
const DISCOVERY_INTERVAL = time.Minute

Variables

View Source
var ErrEmptyEdit = errors.New("empty edit")

Functions

This section is empty.

Types

type ChatUI

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

ChatUI is a Text User Interface (TUI) for a Room. The Run method will draw the UI to the terminal in "fullscreen" mode. You can quit with Ctrl-C, or by typing "/quit" into the chat prompt.

func Init added in v0.4.0

func Init(p2P *p2p.P2P, a *actor.Actor) *ChatUI

func New added in v0.3.0

func New(p *p2p.P2P, a *actor.Actor) (*ChatUI, error)

New returns a new ChatUI struct that controls the text UI. It won't actually do anything until you call Run(). The enity is the "room" we are convering with.

func (*ChatUI) Run

func (ui *ChatUI) Run() error

Run starts the chat event loop in the background, then starts the event loop for the text UI.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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