debug

package
v1.4.15-slog Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: Apache-2.0 Imports: 18 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddOutputJsonYamlTextFlag

func AddOutputJsonYamlTextFlag(cmd *kingpin.CmdClause)

func DefineDebugCommands

func DefineDebugCommands(kpApp *kingpin.Application)

func DefineDebugCommandsSelf added in v1.0.8

func DefineDebugCommandsSelf(kpApp *kingpin.Application)

func FormatFromRequest added in v1.0.8

func FormatFromRequest(request *http.Request) string

Types

type BadRequestError added in v1.4.0

type BadRequestError struct {
	Msg string
}

func (*BadRequestError) Error added in v1.4.0

func (be *BadRequestError) Error() string

type Client

type Client struct {
	SocketPath string
}

func DefaultClient

func DefaultClient() *Client

func NewClient

func NewClient() *Client

func (*Client) Get

func (c *Client) Get(url string) ([]byte, error)

func (*Client) Post added in v1.0.8

func (c *Client) Post(targetUrl string, data map[string][]string) ([]byte, error)

func (*Client) WithSocketPath

func (c *Client) WithSocketPath(path string)

type ConfigRequest added in v1.0.8

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

func Config added in v1.0.8

func Config(client *Client) *ConfigRequest

func (*ConfigRequest) List added in v1.0.8

func (cr *ConfigRequest) List(format string) ([]byte, error)

func (*ConfigRequest) Set added in v1.0.8

func (cr *ConfigRequest) Set(name string, value string, duration time.Duration) ([]byte, error)

type HookRequest added in v1.0.8

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

func Hook added in v1.0.8

func Hook(client *Client) *HookRequest

func (*HookRequest) List added in v1.0.8

func (r *HookRequest) List(format string) ([]byte, error)

func (*HookRequest) Name added in v1.0.8

func (r *HookRequest) Name(name string) *HookRequest

func (*HookRequest) Snapshots added in v1.0.8

func (r *HookRequest) Snapshots(format string) ([]byte, error)

type QueueRequest

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

func Queue

func Queue(client *Client) *QueueRequest

func (*QueueRequest) List added in v1.0.8

func (qr *QueueRequest) List(format string, showEmpty bool) ([]byte, error)

func (*QueueRequest) Main added in v1.0.8

func (qr *QueueRequest) Main(format string) ([]byte, error)

type Server

type Server struct {
	Prefix     string
	SocketPath string
	HttpAddr   string

	Router chi.Router
	// contains filtered or unexported fields
}

func NewServer

func NewServer(prefix, socketPath, httpAddr string, logger *unilogger.Logger) *Server

func (*Server) Init

func (s *Server) Init() (err error)

func (*Server) RegisterHandler added in v1.4.0

func (s *Server) RegisterHandler(method, pattern string, handler func(request *http.Request) (interface{}, error))

RegisterHandler registers http handler for unix/http debug server

Jump to

Keyboard shortcuts

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