Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CmdNettest = &cobra.Command{ Use: "nettest", Short: "Starts a tiny web server for checking networking connectivity", Long: `Starts a web server for checking networking connectivity on the given "--port". Will dial out to, and expect to hear from, every pod that is a member of the service passed in the flag "--service". The web server will have the following endpoints: - "/read": to see the current state, or "/quit" to shut down. - "/status": to see "pass/running/fail" determination. (literally, it will return one of those words.) - "/write": is used by other network test pods to register connectivity.`, Args: cobra.MaximumNArgs(0), Run: main, }
CmdNettest is used by agnhost Cobra.
Functions ¶
This section is empty.
Types ¶
type State ¶
type State struct { // Hostname is set once and never changed-- it's always safe to read. Hostname string // The below fields require that lock is held before reading or writing. Sent map[string]int Received map[string]int Errors []string Log []string StillContactingPeers bool // contains filtered or unexported fields }
State tracks the internal state of our little http server. It's returned verbatim over the /read endpoint.
Click to show internal directories.
Click to hide internal directories.