debug

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 18 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

func DefineDebugCommandsSelf(kpApp *kingpin.Application)

func FormatFromRequest

func FormatFromRequest(request *http.Request) string

Types

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

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

func (*Client) WithSocketPath

func (c *Client) WithSocketPath(path string)

type ConfigRequest

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

func Config

func Config(client *Client) *ConfigRequest

func (*ConfigRequest) List

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

func (*ConfigRequest) Set

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

type HookRequest

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

func Hook

func Hook(client *Client) *HookRequest

func (*HookRequest) List

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

func (*HookRequest) Name

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

func (*HookRequest) Snapshots

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

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

func (*QueueRequest) Main

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

type Server

type Server struct {
	Prefix     string
	SocketPath string
	HttpAddr   string

	Router chi.Router
}

func NewServer

func NewServer(prefix, socketPath, httpAddr string) *Server

func (*Server) Init

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

func (*Server) Route

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

func (*Server) RoutePOST

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

Jump to

Keyboard shortcuts

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