debug

package
v1.0.0-beta.11 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2020 License: Apache-2.0 Imports: 14 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 GetLogEntry

func GetLogEntry(r *http.Request) logrus.FieldLogger

func LogEntrySetField

func LogEntrySetField(r *http.Request, key string, value interface{})

func LogEntrySetFields

func LogEntrySetFields(r *http.Request, fields map[string]interface{})

func NewStructuredLogger

func NewStructuredLogger(logger *logrus.Logger) func(next http.Handler) http.Handler

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) WithSocketPath

func (c *Client) WithSocketPath(path string)

type QueueRequest

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

func Queue

func Queue(client *Client) *QueueRequest

func (*QueueRequest) Dump

func (qr *QueueRequest) Dump(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) WithPrefix

func (s *Server) WithPrefix(prefix string)

func (*Server) WithSocketPath

func (s *Server) WithSocketPath(path string)

type StructuredLogger

type StructuredLogger struct {
	Logger *logrus.Logger
}

func (*StructuredLogger) NewLogEntry

func (l *StructuredLogger) NewLogEntry(r *http.Request) middleware.LogEntry

type StructuredLoggerEntry

type StructuredLoggerEntry struct {
	Logger logrus.FieldLogger
}

func (*StructuredLoggerEntry) Panic

func (l *StructuredLoggerEntry) Panic(v interface{}, stack []byte)

This will log panics to log

func (*StructuredLoggerEntry) Write

func (l *StructuredLoggerEntry) Write(status, bytes int, elapsed time.Duration)

Jump to

Keyboard shortcuts

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