state

package
v2.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2026 License: MIT Imports: 17 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Address

func Address(backend string) string

Address of a server as a person reads it, its password left out

Types

type State

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

What icebath keeps for each profile apart from its settings: the server the windows of this computer on it run on, which each profile sets for itself in a file of its folder only its user reads. The terminal's window connects to the server its profile names as it starts and again whenever it switches to a profile that names another, or the person sets another for its profile

func New

func New(cfg *config.Config) *State

func (*State) Answers

func (s *State) Answers(ctx context.Context, cfg *config.Config, backend string) error

Whether the server at the address answers and takes its password, asked through the proxy and with the authorities of the environment of the profile of the settings

func (*State) Backend

func (s *State) Backend(profile string) (string, error)

Server the windows of this computer on the profile run on, empty for each terminal's own; the window's profile when none is named

func (*State) Connected

func (s *State) Connected(profile, running, unreached string)

Says the window of this terminal is on the profile and runs on the server, empty for this terminal's own, and why the server its profile names could not be used, empty when it could

func (*State) Delete

func (s *State) Delete(profile string) error

Removes the state of a deleted profile, so a folder of it that could not be removed names no server

func (*State) OnChange

func (s *State) OnChange(fn func(profile string))

Has fn told of each profile whose server is set from now on

func (*State) Profile

func (s *State) Profile() string

Profile the window of this terminal is on, the one the process started on before the window connects

func (*State) Reach

func (s *State) Reach(ctx context.Context, profile, backend string) error

Checks that the server at the address answers and takes its password within the wait the window's settings give, asked through the proxy and with the authorities of the environment of the profile

func (*State) Running

func (s *State) Running() string

Server the window of this terminal runs on, empty for this terminal's own

func (*State) SetBackend

func (s *State) SetBackend(profile, backend string) error

Sets the server the windows of this computer on the profile run on, empty for each terminal's own; the window's profile when none is named. The window of this terminal connects again when it is on that profile

func (*State) Unreached

func (s *State) Unreached() string

Why the server the window's profile names could not be used as the window connected, empty when it could

func (*State) Waiting

func (s *State) Waiting(wait func() time.Duration)

Takes how long the check that a server answers waits as the window connects

Directories

Path Synopsis
Page of Server in the settings menu: which icebath server the terminals of a profile use, their own or one on another computer, and the address and password other apps use to reach this computer's server
Page of Server in the settings menu: which icebath server the terminals of a profile use, their own or one on another computer, and the address and password other apps use to reach this computer's server

Jump to

Keyboard shortcuts

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