package nettest
import "k8s.io/kubernetes/test/images/agnhost/nettest"
Index ¶
Variables ¶
var CmdNettest = &cobra.Command{ Use: "nettest", Short: "Starts a tiny web server for checking networking connectivity", Long: "" /* 491 byte string literal not displayed */, Args: cobra.MaximumNArgs(0), Run: main, }
CmdNettest is used by agnhost Cobra.
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.
func (*State) Logf ¶
Logf writes to the log message list. s must not be locked. s's Log member will drop an old message if it would otherwise become longer than 500 messages.
type WritePost ¶
WritePost is the format that (json encoded) requests to the /write handler should take.
type WriteResp ¶
type WriteResp struct { Hostname string }
WriteResp is returned by /write
Source Files ¶
nettest.go
- Version
- v1.33.0 (latest)
- Published
- Apr 23, 2025
- Platform
- linux/amd64
- Imports
- 19 packages
- Last checked
- 27 minutes ago –
Tools for package owners.