daemon

package
v0.11.8 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2025 License: BSD-3-Clause, MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Flag = "--daemon"
)

Variables

View Source
var AlreadyRunning = errors.New("already running")

Functions

func Connect

func Connect() (net.Conn, error)

func Ensure

func Ensure(ctx context.Context) error

Ensure starts the daemon if it is not already running, provided that the BORING_NO_SPAWN environment variable is not set.

func Run

func Run()

Types

type Cmd

type Cmd struct {
	Kind   CmdKind     `json:"kind"`
	Tunnel tunnel.Desc `json:"tunnel,omitempty"`
}

type CmdKind

type CmdKind int
const (
	Nop CmdKind = iota
	Open
	Close
	List
)

func (CmdKind) String

func (k CmdKind) String() string

type Resp

type Resp struct {
	Success bool                   `json:"success"`
	Error   string                 `json:"error"`
	Tunnels map[string]tunnel.Desc `json:"tunnels"`
}

Jump to

Keyboard shortcuts

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