import "github.com/docker/docker/vendor/github.com/docker/libnetwork/diagnostic"
DebugHTTPForm helper to print the form url parameters
func HTTPReply(w http.ResponseWriter, r *HTTPResult, j *JSONOutput) (int, error)
HTTPReply helper function that takes care of sending the message out
ErrorCmd command with error
type HTTPHandlerFunc func(interface{}, http.ResponseWriter, *http.Request)
HTTPHandlerFunc TODO
type HTTPResult struct { Message string `json:"message"` Details StringInterface `json:"details"` }
HTTPResult Diagnostic Server HTTP result operation
func CommandSucceed(result StringInterface) *HTTPResult
CommandSucceed creates a success message
func FailCommand(err error) *HTTPResult
FailCommand creates a failure message with error
func WrongCommand(message, usage string) *HTTPResult
WrongCommand creates a wrong command response
func (h *HTTPResult) String() string
type JSONOutput struct {
// contains filtered or unexported fields
}
JSONOutput contains details on JSON output printing
func ParseHTTPFormOptions(r *http.Request) (bool, *JSONOutput)
ParseHTTPFormOptions easily parse the JSON printing options
NetworkStatsResult network db stats related to entries and queue len for a network
func (n *NetworkStatsResult) String() string
type PeerEntryObj struct { Index int `json:"-"` Name string `json:"-=name"` IP string `json:"ip"` }
PeerEntryObj entry in the networkdb peer table
func (p *PeerEntryObj) String() string
Server when the debug is enabled exposes a This data structure is protected by the Agent mutex so does not require and additional mutex here
New creates a new diagnostic server
DisableDiagnostic stop the dubug and closes the tcp socket
EnableDiagnostic opens a TCP socket to debug the passed network DB
Init initialize the mux for the http handling and register the base hooks
IsDiagnosticEnabled returns true when the debug is enabled
func (s *Server) RegisterHandler(ctx interface{}, hdlrs map[string]HTTPHandlerFunc)
RegisterHandler allows to register new handlers to the mux and to a specific path
ServeHTTP this is the method called bu the ListenAndServe, and is needed to allow us to use our custom mux
StringCmd command with info string
StringInterface interface that has to be implemented by messages
type TableEndpointsResult struct { TableObj Elements []TableEntryObj `json:"entries"` }
TableEndpointsResult fully typed message for proper unmarshaling on the client side
type TableEntryObj struct { Index int `json:"-"` Key string `json:"key"` Value string `json:"value"` Owner string `json:"owner"` }
TableEntryObj network db table entry object
func (t *TableEntryObj) String() string
type TableObj struct { Length int `json:"size"` Elements []StringInterface `json:"entries"` }
TableObj network db table object
type TablePeersResult struct { TableObj Elements []PeerEntryObj `json:"entries"` }
TablePeersResult fully typed message for proper unmarshaling on the client side
UsageCmd command with usage field
Package diagnostic imports 9 packages (graph). Updated 2019-03-16. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).