cli

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyFlags

func ApplyFlags(cfg *config.Config,
	wsAddr, listenAddr, tcpAddr, dataDir, networkID, joinAddr, joinToken string,
	caEnabled bool, caToken string,
	socksEnabled bool, socksListen string,
	dnsEnabled bool, dnsListen string,
	tunEnabled bool,
	scribeEnabled bool, scribeListen string,
	exitEnabled bool,
)

ApplyFlags merges CLI flags into the loaded config. Flags take precedence.

func CtrlDo

func CtrlDo(socketPath string, cmd interface{}) (map[string]json.RawMessage, error)

CtrlDo sends a JSON command to the daemon's control socket and returns the response.

func DoJoin

func DoJoin(cfg *config.Config, relayAddr, token string) error

DoJoin performs the join flow against a relay CA.

func LoadOrInitCA

func LoadOrInitCA(dir, token string) (*node.CA, error)

LoadOrInitCA loads or creates a CA from the given directory.

func NodeFlags

func NodeFlags(fs *flag.FlagSet) (
	configPath, wsAddr, listenAddr, tcpAddr, dataDir, networkID, joinAddr, joinToken *string,
	caEnabled *bool, caToken *string,
	socksEnabled *bool, socksListen *string,
	dnsEnabled *bool, dnsListen *string,
	tunEnabled *bool,
	scribeEnabled *bool, scribeListen *string,
	exitEnabled *bool,
)

NodeFlags registers all flags for running a node on the given FlagSet.

func PrintUsage

func PrintUsage()

func ResolveDataDir

func ResolveDataDir(dataDir, configPath string) string

ResolveDataDir resolves the data directory from flags or config.

func RunACL

func RunACL(args []string)

func RunCA

func RunCA(args []string)

func RunCALog

func RunCALog(args []string)

func RunCASign

func RunCASign(args []string)

func RunCert

func RunCert(args []string)

func RunConnect

func RunConnect(args []string)

func RunDNS

func RunDNS(args []string)

func RunForward

func RunForward(args []string)

func RunID

func RunID(args []string)

func RunJoin

func RunJoin(args []string)

func RunNode

func RunNode(args []string)

RunNode starts a relay node. Called when pulse is run with no subcommand.

func RunRevoke

func RunRevoke(args []string)

func RunRoute

func RunRoute(args []string)

func RunSetName

func RunSetName(args []string)

func RunSetup

func RunSetup(args []string)

func RunSetupDNS

func RunSetupDNS(args []string)

func RunStart

func RunStart(args []string)

func RunStatus

func RunStatus(args []string)

func RunStop

func RunStop(args []string)

func RunTag

func RunTag(args []string)

func RunToken

func RunToken(args []string)

func RunTop

func RunTop(args []string)

func RunUntag

func RunUntag(args []string)

func SocketPath

func SocketPath(args []string) string

SocketPath resolves the control socket path from flags or config.

Types

This section is empty.

Jump to

Keyboard shortcuts

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