app

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: MIT Imports: 1 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

Overview

Package app holds the product identity in one place. Everything user-visible (binary name, env var prefix, service labels, directories) derives from it.

Index

Constants

View Source
const (
	// Name is the user-visible product name.
	Name = "Portside"
	// ID is the lowercase identifier used for the binary, directories and hostnames.
	ID = "portside"
	// ServiceLabel identifies the background service in launchd.
	ServiceLabel = "app.foreverbeta.portside"
	// MenuBarAppID is the macOS menu bar app's bundle identifier.
	MenuBarAppID = ServiceLabel + ".app"
	// DefaultPort is where the daemon serves the dashboard, API and *.localhost proxy.
	DefaultPort = 7878
	// PeerHeader marks requests between daemons on the owner's devices.
	// Browsers cannot add it without a CORS preflight, which is never granted.
	PeerHeader = "X-" + Name + "-Peer"
)

Variables

View Source
var Version = "dev"

Version is the build's version; the command sets it from its -ldflags value.

Functions

func Env

func Env(key string) string

Env returns the name of an environment variable in the product namespace, for example Env("CONFIG") == "PORTSIDE_CONFIG".

func FallbackPorts

func FallbackPorts() []int

FallbackPorts are the ports, in order, that a daemon whose config sets no port tries when DefaultPort is taken: 7879-7899, then 17879-17899. Both ranges lie below the ephemeral ports of macOS (49152 and up) and Linux (32768 and up), so a port chosen once stays free of outgoing connections.

Types

This section is empty.

Jump to

Keyboard shortcuts

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