cli

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: MIT Imports: 60 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// EDNS0_OPTION_MAC is dnsmasq EDNS0 code for adding mac option.
	// https://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=blob;f=src/dns-protocol.h;h=76ac66a8c28317e9c121a74ab5fd0e20f6237dc8;hb=HEAD#l81
	// This is also dns.EDNS0LOCALSTART, but define our own constant here for clarification.
	EDNS0_OPTION_MAC = 0xFDE9
)

Variables

This section is empty.

Functions

func Main

func Main()

func RunCobraCommand added in v1.3.1

func RunCobraCommand(cmd *cobra.Command)

RunCobraCommand runs ctrld cli.

func RunMobile added in v1.3.1

func RunMobile(appConfig *AppConfig, appCallback *AppCallback, stopCh chan struct{})

RunMobile runs the ctrld cli on mobile platforms.

Types

type AppCallback added in v1.3.1

type AppCallback struct {
	HostName   func() string
	LanIp      func() string
	MacAddress func() string
	Exit       func(error string)
}

AppCallback provides hooks for injecting certain functionalities from mobile platforms to main ctrld cli.

type AppConfig added in v1.3.1

type AppConfig struct {
	CdUID   string
	HomeDir string
	Verbose int
	LogPath string
}

AppConfig allows overwriting ctrld cli flags from mobile platforms.

Jump to

Keyboard shortcuts

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