cli

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: May 28, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version is set during build time
	Version string
)

Functions

func Daemon

func Daemon(flags *Config)

Daemon is the main entry point for starting the application

func ValidateConfig

func ValidateConfig(config *Config) error

ValidateConfig performs validation on the configuration

Types

type Config

type Config struct {
	Debug    bool
	Version  string
	CacheDir string
	Mode     int
	Listen   string
	Mirrors  MirrorConfig
}

Config holds all application configuration

func ParseFlags

func ParseFlags() (*Config, error)

ParseFlags parses command-line flags and returns a Config

type MirrorConfig

type MirrorConfig struct {
	Ubuntu         string
	UbuntuPorts    string
	Debian         string
	DebianSecurity string
	CentOS         string
	Alpine         string
	Rocky          string
	Fedora         string
}

MirrorConfig holds mirror-specific configuration

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server represents the main application server

func NewServer

func NewServer(cfg *Config) (*Server, error)

NewServer creates and initializes a new Server instance

func (*Server) Start

func (s *Server) Start() error

Start begins serving requests and handles graceful shutdown

Jump to

Keyboard shortcuts

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