tui

package
v1.0.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	AllShorts(ctx context.Context) ([]container.Short, error)
	Logs(ctx context.Context, id string) (client.LogSeq, context.CancelFunc)
	FilesIn(ctx context.Context, root file.Info) ([]file.Info, error)
	CopyFrom(ctx context.Context, src file.Info, dst string) (string, error)
	Details(ctx context.Context, id string) (container.Details, error)
	Stats(ctx context.Context, id string) client.StatsSeq
	Terminal(ctx context.Context, id string, in io.Reader, out io.Writer) error
	StartContainer(ctx context.Context, id string) error
	StopContainer(ctx context.Context, id string) error
	RestartContainer(ctx context.Context, id string) error
	RemoveContainer(ctx context.Context, id string) error
	PauseContainer(ctx context.Context, id string) error
	UnpauseContainer(ctx context.Context, id string) error
	Engine(ctx context.Context) (engine.Info, error)
	DaemonHost() string
	DaemonVersion() string
}

Client is the subset of client.Client the TUI depends on.

type Config

type Config struct {
	Host         string
	DockerHost   string
	Username     string
	IdentityFile string
	AskPassword  bool
}

type Model

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

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Model) View

func (m Model) View() tea.View

type UI

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

func New

func New(cfg Config) (*UI, error)

New connects the client and returns a UI instance. It does not start the TUI application; the caller must call Run() to do so. Note that the caller is responsible for calling Close() on the UI to clean up resources after Run() returns.

func (*UI) Close

func (ui *UI) Close() error

func (*UI) Run

func (ui *UI) Run(ctx context.Context) error

Run starts the TUI application and blocks until it exits.

Directories

Path Synopsis
Package theme holds the colors and styles shared by the TUI panes.
Package theme holds the colors and styles shared by the TUI panes.

Jump to

Keyboard shortcuts

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