cockroach: Index | Files

package diagutils

import ""


Package Files


type RequestData Uses

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


RequestData stores the data provided by a diagnostics request.

type Server Uses

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 Uses

func NewServer() *Server

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

func (*Server) Close Uses

func (s *Server) Close()

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

func (*Server) LastRequestData Uses

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 Uses

func (s *Server) NumRequests() int

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

func (*Server) URL Uses

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

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

Package diagutils imports 7 packages (graph). Updated 2020-04-10. Refresh now. Tools for package owners.