app

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultAddr        = "0.0.0.0:8765"
	DefaultPairingTTL  = 5 * time.Minute
	DefaultPollEvery   = 5 * time.Second
	DefaultCanaryEvery = time.Minute
)

Variables

This section is empty.

Functions

func LoopbackAddrForLocalConnect

func LoopbackAddrForLocalConnect(addr string) string

LoopbackAddrForLocalConnect returns an address the Mac-side CLI can use to reach the local app server. It intentionally differs from PublicURLForAddr.

func PublicURLForAddr

func PublicURLForAddr(addr string) string

PublicURLForAddr returns the browser-visible URL for an app listen address. Wildcard binds need a concrete LAN address because phones cannot resolve the Mac's loopback address.

Types

type App

type App struct {
	Options Options
	Store   *state.Store
	Auth    *auth.Manager
	Live    *live.Service
	Relay   relay.Client
	Server  *hyperserve.Server
	// contains filtered or unexported fields
}

func New

func New(opts Options) (*App, error)

func (*App) Close

func (a *App) Close() error

func (*App) Run

func (a *App) Run(ctx context.Context) error

type Options

type Options struct {
	Addr             string
	PublicURL        string
	PublicURLFromEnv bool
	Remote           bool
	RemoteURL        string
	StateDir         string
	SocketPath       string
	Version          string
	PairingTTL       time.Duration
	PollEvery        time.Duration
	CanaryEvery      time.Duration
}

func DefaultOptions

func DefaultOptions(version string) Options

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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