debug

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2022 License: Apache-2.0 Imports: 18 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OutputFormat = "text"

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

func HandleFormattedOutput added in v1.0.8

func HandleFormattedOutput(writer http.ResponseWriter, request *http.Request, handler func(request *http.Request) (interface{}, error))

func TransformUsingFormat added in v1.0.8

func TransformUsingFormat(val interface{}, format string) ([]byte, error)

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 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) ([]byte, error)

func (*QueueRequest) Main added in v1.0.8

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

type Server

type Server struct {
	SocketPath string
	Prefix     string

	Router chi.Router
}

func NewServer

func NewServer() *Server

func (*Server) Init

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

func (*Server) Route added in v1.0.8

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

func (*Server) RoutePOST added in v1.0.8

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

func (*Server) WithPrefix

func (s *Server) WithPrefix(prefix string)

func (*Server) WithSocketPath

func (s *Server) WithSocketPath(path string)

Jump to

Keyboard shortcuts

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