kubernetes: k8s.io/kubernetes/test/images/agnhost/nettest Index | Files

package nettest

import "k8s.io/kubernetes/test/images/agnhost/nettest"

Index

Package Files

nettest.go

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.

type State Uses

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 Uses

func (s *State) Logf(format string, args ...interface{})

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 Uses

type WritePost struct {
    Source string
    Dest   string
}

WritePost is the format that (json encoded) requests to the /write handler should take.

type WriteResp Uses

type WriteResp struct {
    Hostname string
}

WriteResp is returned by /write

Package nettest imports 18 packages (graph) and is imported by 2 packages. Updated 2019-07-17. Refresh now. Tools for package owners.