diagutils

package
v0.0.0-...-1b6ad0c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RequestData

type RequestData struct {
	UUID          string
	Version       string
	LicenseType   string
	Internal      string
	RawReportBody string

	diagnosticspb.DiagnosticReport
}

RequestData stores the data provided by a diagnostics request.

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server is a http server that implements a diagnostics endpoint. Its URL can be used as the updates or reporting URL (see diagonsticspb.TestingKnobs).

func NewServer

func NewServer() *Server

NewServer creates and starts a new server. The server must be closed.

func (*Server) Close

func (s *Server) Close()

Close shuts down the server and blocks until all outstanding requests on this server have completed.

func (*Server) LastRequestData

func (s *Server) LastRequestData() *RequestData

LastRequestData returns the data from last request received by the server. Returns nil if there were no requests.

func (*Server) NumRequests

func (s *Server) NumRequests() int

NumRequests returns the total number of requests received by this server.

func (*Server) URL

func (s *Server) URL() *url.URL

URL returns the URL that can be used to send requests to the server.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL