state

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2026 License: MIT Imports: 16 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 between runs for each profile apart from its settings: the server its apps run on, which each profile sets for itself in a file of its folder only its user reads. A process reads the choice of its profile once as it starts and runs on that server until it ends, so a choice changed meanwhile, by it or by any other window, is for the windows started after

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 profile's apps run on from their next start, empty for icebath's own; the profile in use when none is named

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) Leave

func (s *State) Leave()

Leaves the server this process was set to run on for this run, which runs on icebath's own instead

func (*State) Profile

func (s *State) Profile() string

Profile this process is on now

func (*State) Reach

func (s *State) Reach(ctx context.Context) error

Checks that the server this process was set to run on answers and takes its password, keeping why when it does not

func (*State) Running

func (s *State) Running() string

Server this process runs on, empty for icebath's own

func (*State) SetBackend

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

Sets the server the profile's apps run on from their next start, empty for icebath's own; the profile in use when none is named. What this process and the windows open now run on stays as it is

func (*State) Unreached

func (s *State) Unreached() string

Why the server this process was set to run on could not be used as it started, empty when it could

func (*State) Use

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

Takes the profile in use from now on; the first, the profile this process starts on, names the server it runs on until it ends

func (*State) Waiting

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

Takes how long the check that the server this process was set to run on answers waits as the process starts

Directories

Path Synopsis
Page of Server in the settings menu: which icebath server the windows of a profile run on, its own or one on another computer, and the address and password that other apps reach this computer's with
Page of Server in the settings menu: which icebath server the windows of a profile run on, its own or one on another computer, and the address and password that other apps reach this computer's with

Jump to

Keyboard shortcuts

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