daemon

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2026 License: BSD-3-Clause, MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

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

Variables

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

Functions

func Run

func Run()

Types

type Cmd

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

Cmd represents a command sent to the daemon

type CmdKind

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

func (CmdKind) String

func (k CmdKind) String() string

type Info added in v0.12.0

type Info struct {
	// Commit is the 5-character commit hash identifying the daemon build
	Commit string `json:"commit"`
}

Info contains information about the daemon, e.g. the build commit

type Resp

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

Resp represents a response from the daemon

Jump to

Keyboard shortcuts

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