Documentation
¶
Overview ¶
Package hostprovider names the cloud or VPS provider this server runs on, from DMI strings first and a short link-local metadata probe second, and holds the provider-specific steps for opening web ports in a firewall the control plane cannot change.
Index ¶
Constants ¶
View Source
const ( SourceDMI = "dmi" SourceMetadata = "metadata" )
Detection sources.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Deps ¶
type Deps struct {
ReadFile func(path string) ([]byte, error)
// Get performs one GET and returns the status code and a bounded body.
Get func(ctx context.Context, url string, header http.Header) (int, []byte, error)
}
Deps are the host seams; tests replace both.
func SystemDeps ¶
func SystemDeps() Deps
SystemDeps reads the real host and uses a one second metadata timeout.
type Guidance ¶
type Guidance struct {
ID ID `json:"id"`
Name string `json:"name"`
Source string `json:"source"`
DocsURL string `json:"docs_url"`
Ports []PortRule `json:"ports"`
Steps []string `json:"steps"`
Note string `json:"note,omitempty"`
}
Guidance is the exact manual procedure for one provider's firewall.
Click to show internal directories.
Click to hide internal directories.