Documentation
¶
Index ¶
- Constants
- Variables
- func CopyFile(dstPathname, srcPathname string) error
- func CopyFileFromFS(dstPathname, srcPathname string, srcFS fs.FS) error
- func DownloadFileRoot(root *os.Root, mirrorUrl, requestPath string) (string, []byte, error)
- func ExtractTarballFile(dstPath, srcPath, tarPath string) error
- func Fatal(err error) error
- func Fatalf(format string, args ...interface{}) error
- func FormatJSON(v any) string
- func GenerateInitrd(outputName, inputName string, fileNames []string) error
- func IsDir(path string) bool
- func IsDirFS(filesystem fs.FS, pathname string) bool
- func IsDirRoot(root *os.Root, pathname string) bool
- func IsFile(path string) bool
- func IsFileFS(filesystem fs.FS, pathname string) bool
- func IsFileRoot(root *os.Root, pathname string) bool
- func MkdirAllRoot(root *os.Root, pathname string) error
- func UnzipFile(filename string) (string, error)
- func Warning(format string, args ...interface{})
- func WriteTarball(dstPath, srcDir string, chownRoot bool) error
- func ZipFile(filename string) (string, error)
- type AddResponse
- type Config
- type DeleteResponse
- type Host
- type HostAddressResponse
- type HostCache
- func (c *HostCache) AddHostHandlerTLS(w http.ResponseWriter, r *http.Request)
- func (c *HostCache) AlpineHandler(w http.ResponseWriter, r *http.Request)
- func (c *HostCache) AlpineHandlerTLS(w http.ResponseWriter, r *http.Request)
- func (c *HostCache) DebianHandler(w http.ResponseWriter, r *http.Request)
- func (c *HostCache) DebianHandlerTLS(w http.ResponseWriter, r *http.Request)
- func (c *HostCache) DebianSecurityHandler(w http.ResponseWriter, r *http.Request)
- func (c *HostCache) DebianSecurityHandlerTLS(w http.ResponseWriter, r *http.Request)
- func (c *HostCache) DeleteHostHandlerTLS(w http.ResponseWriter, r *http.Request)
- func (c *HostCache) GDLHandlerTLS(w http.ResponseWriter, r *http.Request)
- func (c *HostCache) GenerateISO(tempDir, url, httpUrl string, bootFiles []string, config *Config) (string, error)
- func (c *HostCache) HostAddressQueryHandlerTLS(w http.ResponseWriter, r *http.Request)
- func (c *HostCache) HostBootedHandlerTLS(w http.ResponseWriter, r *http.Request)
- func (c *HostCache) IPXEHandlerTLS(w http.ResponseWriter, r *http.Request)
- func (c *HostCache) ListHostsHandlerTLS(w http.ResponseWriter, r *http.Request)
- func (c *HostCache) OpenBSDHandler(w http.ResponseWriter, r *http.Request)
- func (c *HostCache) OpenBSDHandlerTLS(w http.ResponseWriter, r *http.Request)
- func (c *HostCache) PNGHandlerTLS(w http.ResponseWriter, r *http.Request)
- func (c *HostCache) RootHandler(w http.ResponseWriter, r *http.Request)
- func (c *HostCache) RootHandlerTLS(w http.ResponseWriter, r *http.Request)
- func (c *HostCache) SanBootHandler(w http.ResponseWriter, r *http.Request)
- func (c *HostCache) UTCHandler(w http.ResponseWriter, r *http.Request)
- func (c *HostCache) UTCHandlerTLS(w http.ResponseWriter, r *http.Request)
- func (c *HostCache) UploadPackageHandlerTLS(w http.ResponseWriter, r *http.Request)
- func (c *HostCache) VersionHandlerTLS(w http.ResponseWriter, r *http.Request)
- type HostListResponse
- type InitFile
- type MkBoot
- type NetbootOption
- type Options
- type Record
- type Response
- type Server
- type Template
Constants ¶
View Source
const DEFAULT_ADDRESS = "127.0.0.1"
View Source
const DEFAULT_ALPINE_MIRROR = "https://dl-cdn.alpinelinux.org"
View Source
const DEFAULT_DEBIAN_MIRROR = "http://ftp.us.debian.org"
mirrors used by netboot proxy feature
View Source
const DEFAULT_DEBIAN_SECURITY_MIRROR = "http://security.debian.org"
View Source
const DEFAULT_HOSTNAME = "localhost"
View Source
const DEFAULT_HTTPS_PORT = "4443"
View Source
const DEFAULT_HTTP_PORT = "4444"
View Source
const DEFAULT_OPENBSD_MIRROR = "http://mirrors.mit.edu"
View Source
const DEFAULT_SHUTDOWN_TIMEOUT_SECONDS = 10
View Source
const Version = "1.0.0"
Variables ¶
View Source
var ALPINE_VERSION_PATTERN = regexp.MustCompile(`([0-9][0-9]*)\.([0-9][0-9]*)\.([0-9][0-9]*)$`)
View Source
var APKOVL_PATTERN = regexp.MustCompile(`^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})\.apkovl\.tar\.gz$`)
View Source
var IPXE_PATTERN = regexp.MustCompile(`^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})\.ipxe$`)
View Source
var MAC_PATTERN = regexp.MustCompile(`^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$`)
View Source
var TARBALL_PATTERN = regexp.MustCompile(`^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})\.tgz$`)
Functions ¶
func CopyFileFromFS ¶ added in v0.0.7
func DownloadFileRoot ¶ added in v0.0.7
func ExtractTarballFile ¶ added in v0.0.7
func FormatJSON ¶
func GenerateInitrd ¶ added in v0.0.3
func WriteTarball ¶ added in v0.0.10
Types ¶
type AddResponse ¶
type Config ¶
type Config struct {
Address string `json:"address"`
OS string `json:"os"`
Version string `json:"version"`
Arch string `json:"arch"`
Serial string `json:"serial"`
Mirror string `json:"mirror"`
Response string `json:"response"`
DisklabelTemplate string `json:"disklabel_template"`
KernelParams string `json:"kernel_params"`
Debug bool `json:"debug"`
Quiet bool `json:"quiet"`
}
type DeleteResponse ¶
type HostAddressResponse ¶
type HostCache ¶
type HostCache struct {
// contains filtered or unexported fields
}
func (*HostCache) AddHostHandlerTLS ¶ added in v0.0.10
func (c *HostCache) AddHostHandlerTLS(w http.ResponseWriter, r *http.Request)
func (*HostCache) AlpineHandler ¶ added in v0.0.7
func (c *HostCache) AlpineHandler(w http.ResponseWriter, r *http.Request)
func (*HostCache) AlpineHandlerTLS ¶ added in v0.0.10
func (c *HostCache) AlpineHandlerTLS(w http.ResponseWriter, r *http.Request)
func (*HostCache) DebianHandler ¶ added in v0.0.3
func (c *HostCache) DebianHandler(w http.ResponseWriter, r *http.Request)
func (*HostCache) DebianHandlerTLS ¶ added in v0.0.10
func (c *HostCache) DebianHandlerTLS(w http.ResponseWriter, r *http.Request)
func (*HostCache) DebianSecurityHandler ¶ added in v0.0.7
func (c *HostCache) DebianSecurityHandler(w http.ResponseWriter, r *http.Request)
func (*HostCache) DebianSecurityHandlerTLS ¶ added in v0.0.10
func (c *HostCache) DebianSecurityHandlerTLS(w http.ResponseWriter, r *http.Request)
func (*HostCache) DeleteHostHandlerTLS ¶ added in v0.0.10
func (c *HostCache) DeleteHostHandlerTLS(w http.ResponseWriter, r *http.Request)
func (*HostCache) GDLHandlerTLS ¶ added in v0.0.10
func (c *HostCache) GDLHandlerTLS(w http.ResponseWriter, r *http.Request)
func (*HostCache) GenerateISO ¶ added in v0.0.3
func (c *HostCache) GenerateISO(tempDir, url, httpUrl string, bootFiles []string, config *Config) (string, error)
Generate a url-customized netboot ISO returning generated iso pathname
func (*HostCache) HostAddressQueryHandlerTLS ¶ added in v0.0.10
func (c *HostCache) HostAddressQueryHandlerTLS(w http.ResponseWriter, r *http.Request)
func (*HostCache) HostBootedHandlerTLS ¶ added in v0.0.10
func (c *HostCache) HostBootedHandlerTLS(w http.ResponseWriter, r *http.Request)
func (*HostCache) IPXEHandlerTLS ¶ added in v0.0.7
func (c *HostCache) IPXEHandlerTLS(w http.ResponseWriter, r *http.Request)
func (*HostCache) ListHostsHandlerTLS ¶ added in v0.0.10
func (c *HostCache) ListHostsHandlerTLS(w http.ResponseWriter, r *http.Request)
func (*HostCache) OpenBSDHandler ¶ added in v0.0.3
func (c *HostCache) OpenBSDHandler(w http.ResponseWriter, r *http.Request)
func (*HostCache) OpenBSDHandlerTLS ¶ added in v0.0.10
func (c *HostCache) OpenBSDHandlerTLS(w http.ResponseWriter, r *http.Request)
func (*HostCache) PNGHandlerTLS ¶ added in v0.0.10
func (c *HostCache) PNGHandlerTLS(w http.ResponseWriter, r *http.Request)
func (*HostCache) RootHandler ¶ added in v0.0.5
func (c *HostCache) RootHandler(w http.ResponseWriter, r *http.Request)
func (*HostCache) RootHandlerTLS ¶ added in v0.0.10
func (c *HostCache) RootHandlerTLS(w http.ResponseWriter, r *http.Request)
func (*HostCache) SanBootHandler ¶ added in v0.0.10
func (c *HostCache) SanBootHandler(w http.ResponseWriter, r *http.Request)
func (*HostCache) UTCHandler ¶ added in v0.0.7
func (c *HostCache) UTCHandler(w http.ResponseWriter, r *http.Request)
func (*HostCache) UTCHandlerTLS ¶ added in v0.0.10
func (c *HostCache) UTCHandlerTLS(w http.ResponseWriter, r *http.Request)
func (*HostCache) UploadPackageHandlerTLS ¶ added in v0.0.10
func (c *HostCache) UploadPackageHandlerTLS(w http.ResponseWriter, r *http.Request)
func (*HostCache) VersionHandlerTLS ¶ added in v0.0.10
func (c *HostCache) VersionHandlerTLS(w http.ResponseWriter, r *http.Request)
type HostListResponse ¶
type MkBoot ¶
type MkBoot struct {
TempDir string
IpxeDir string
URL string
BootFiles []string
Config *Config
ISO string
// contains filtered or unexported fields
}
type NetbootOption ¶ added in v0.0.10
type NetbootOption int
const ( NetbootOptionDefault NetbootOption = iota NetbootOptionEnable NetbootOptionDisable )
Click to show internal directories.
Click to hide internal directories.