Versions in this module Expand all Collapse all v1 v1.0.0 Aug 15, 2018 Changes in this version + var DefaultHTTPClient = NewHTTPClient(http.DefaultClient) + var DefaultSchemes = Schemes + var DefaultTFTPClient = NewTFTPClient() + var ErrDefaultEntryNotFound = errors.New("default label not found in configuration") + var ErrNoSuchScheme = errors.New("no such scheme") + func GetFile(u *url.URL) (io.ReaderAt, error) + func IsURLError(err error) bool + func LazyGetFile(u *url.URL) (io.ReaderAt, error) + func RegisterScheme(scheme string, fs FileScheme) + type Config struct + DefaultEntry string + Entries map[string]*boot.LinuxImage + func NewConfig(wd *url.URL) *Config + func NewConfigWithSchemes(wd *url.URL, s Schemes) *Config + func ParseConfigFile(url string, wd *url.URL) (*Config, error) + func (c *Config) Append(config string) error + func (c *Config) AppendFile(url string) error + func (c *Config) FindConfigFile(mac net.HardwareAddr, ip net.IP) error + func (c *Config) GetFile(url string) (io.ReaderAt, error) + type FileScheme interface + GetFile func(u *url.URL) (io.ReaderAt, error) + func NewTFTPClient(opts ...tftp.ClientOpt) FileScheme + type HTTPClient struct + func NewHTTPClient(c *http.Client) *HTTPClient + func (h HTTPClient) GetFile(u *url.URL) (io.ReaderAt, error) + type LocalFileClient struct + func (lfs LocalFileClient) GetFile(u *url.URL) (io.ReaderAt, error) + type Schemes map[string]FileScheme + func (s Schemes) GetFile(u *url.URL) (io.ReaderAt, error) + func (s Schemes) LazyGetFile(u *url.URL) (io.ReaderAt, error) + func (s Schemes) Register(scheme string, fs FileScheme) + type TFTPClient struct + func (t *TFTPClient) GetFile(u *url.URL) (io.ReaderAt, error) + type URLError struct + Err error + URL *url.URL + func (s *URLError) Error() string