cli

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEFAULT_HOST          = "0.0.0.0"
	DEFAULT_PORT          = "3142"
	DEFAULT_CACHE_DIR     = "./.aptcache"
	DEFAULT_UBUNTU_MIRROR = "" // "https://mirrors.tuna.tsinghua.edu.cn/ubuntu/"
	DEFAULT_DEBIAN_MIRROR = "" // "https://mirrors.tuna.tsinghua.edu.cn/debian/"
	DEFAULT_CENTOS_MIRROR = "" // "https://mirrors.tuna.tsinghua.edu.cn/centos/"
	DEFAULT_ALPINE_MIRROR = "" // "https://mirrors.tuna.tsinghua.edu.cn/alpine/"
	DEFAULT_MODE_NAME     = Define.LINUX_ALL_DISTROS
	DEFAULT_DEBUG         = false
)

Variables

View Source
var Version string

Functions

func Daemon

func Daemon(appFlags *AppFlags)

func StartServer

func StartServer(appFlags *AppFlags, ap *server.AptProxy)

Types

type AppFlags

type AppFlags struct {
	Debug    bool
	Version  string
	CacheDir string
	Mode     int
	Listen   string

	// mirror
	Ubuntu string
	Debian string
	CentOS string
	Alpine string
}

func ParseFlags

func ParseFlags() (appFlags AppFlags)

Jump to

Keyboard shortcuts

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