Documentation
¶
Index ¶
- Variables
- func AddOutputJsonYamlTextFlag(cmd *cobra.Command)
- func DefineDebugCommands(rootCmd *cobra.Command)
- func DefineDebugCommandsSelf(rootCmd *cobra.Command)
- func DefineSocketFlag(cmd *cobra.Command)
- func FormatFromRequest(request *http.Request) string
- type BadRequestError
- type Client
- type ConfigRequest
- type HookRequest
- type NotFoundError
- type QueueRequest
- type Server
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultSocketPath = "/var/run/shell-operator/debug.socket"
DefaultSocketPath is the path the debug CLI client (DefaultClient) connects to when no explicit socket has been configured. It is a CLI concern only — library consumers should build a debug.Client with NewClient(path) directly.
Functions ¶
func DefineDebugCommands ¶
func DefineDebugCommandsSelf ¶ added in v1.0.8
func DefineSocketFlag ¶ added in v1.18.0
DefineSocketFlag binds the --debug-unix-socket flag on cmd to the process-level DefaultSocketPath used by DefaultClient(). Called by debug sub-commands (queue, hook, config, raw).
func FormatFromRequest ¶ added in v1.0.8
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
// contains filtered or unexported fields
}
func DefaultClient ¶
DefaultClient connects to the unix socket pointed at by DefaultSocketPath. CLI commands bind --debug-unix-socket against DefaultSocketPath via DefineSocketFlag so that this function picks up any flag-supplied override.
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
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
type NotFoundError ¶ added in v1.7.4
type NotFoundError struct {
Msg string
}
func (*NotFoundError) Error ¶ added in v1.7.4
func (nf *NotFoundError) Error() string
type QueueRequest ¶
type QueueRequest struct {
// contains filtered or unexported fields
}
func Queue ¶
func Queue(client *Client) *QueueRequest
type Server ¶
type Server struct {
Prefix string
SocketPath string
HttpAddr string
Router chi.Router
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.