server

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: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	INTERNAL_PAGE_HOME string = "/"
	INTERNAL_PAGE_PING string = "/_/ping/"
)
View Source
const (
	TYPE_NOT_FOUND int = 0
	TYPE_HOME      int = 1
	TYPE_PING      int = 2
)
View Source
const CACHE_META_DIR = "./.aptcache/header/v1"

TODO: use configuration

View Source
const LABEL_NO_VALID_VALUE = "N/A"
View Source
const SERVER_DEFAULT_TEMPLATE = `` /* 15733-byte string literal not displayed */

Variables

This section is empty.

Functions

func GetBaseTemplate

func GetBaseTemplate(cacheSize string, filesNumber string, availableSize string,
	memoryUsage string, goroutines string) string

func GetInternalResType

func GetInternalResType(url string) int

func IsInternalUrls

func IsInternalUrls(url string) bool

func RenderInternalUrls

func RenderInternalUrls(url string) (string, int)

Types

type AptProxy

type AptProxy struct {
	Handler http.Handler
	Rules   []Define.Rule
}

func CreateAptProxyRouter

func CreateAptProxyRouter() *AptProxy

func (*AptProxy) ServeHTTP

func (ap *AptProxy) ServeHTTP(rw http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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