Documentation
¶
Overview ¶
Package debug provides HTTP debug endpoints and CLI client for the proxy server.
Package debug provides HTTP debug endpoints for the proxy server.
Index ¶
- type CaptureOptions
- type Client
- func (c *Client) Capture(ctx context.Context, opts CaptureOptions) error
- func (c *Client) ClientStatus(ctx context.Context, accountID string, filters StatusFilters) error
- func (c *Client) ClientSyncResponse(ctx context.Context, accountID string) error
- func (c *Client) Health(ctx context.Context) error
- func (c *Client) ListClients(ctx context.Context) error
- func (c *Client) PingTCP(ctx context.Context, accountID, host string, port int, timeout string) error
- func (c *Client) SetLogLevel(ctx context.Context, accountID, level string) error
- func (c *Client) StartClient(ctx context.Context, accountID string) error
- func (c *Client) StopClient(ctx context.Context, accountID string) error
- type Handler
- type StatusFilters
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CaptureOptions ¶ added in v0.70.5
type CaptureOptions struct {
AccountID string
Duration string
FilterExpr string
Text bool
Verbose bool
ASCII bool
Output io.Writer
}
CaptureOptions configures a capture request.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides CLI access to debug endpoints.
func (*Client) Capture ¶ added in v0.70.5
func (c *Client) Capture(ctx context.Context, opts CaptureOptions) error
Capture streams a packet capture from the debug endpoint. The response body (pcap or text) is written directly to opts.Output until the server closes the connection or the context is cancelled.
func (*Client) ClientStatus ¶
ClientStatus fetches the status of a specific client.
func (*Client) ClientSyncResponse ¶
ClientSyncResponse fetches the sync response of a specific client.
func (*Client) ListClients ¶
ListClients fetches the list of all clients.
func (*Client) PingTCP ¶
func (c *Client) PingTCP(ctx context.Context, accountID, host string, port int, timeout string) error
PingTCP performs a TCP ping through a client.
func (*Client) SetLogLevel ¶
SetLogLevel sets the log level of a specific client.
func (*Client) StartClient ¶
StartClient starts a specific client.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler provides HTTP debug endpoints.
func NewHandler ¶
NewHandler creates a new debug handler.
func (*Handler) ServeHTTP ¶
func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP handles debug requests.
func (*Handler) SetCertStatus ¶
func (h *Handler) SetCertStatus(cs certStatus)
SetCertStatus sets the certificate status provider for ACME prefetch observability.