debug

package
v0.0.0-...-94dd193 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Server)

Option is the functional option type for Server.

func WithAddr

func WithAddr(addr string) Option

WithAddr sets the address to bind to.

func WithAuthToken

func WithAuthToken(token string) Option

WithAuthToken sets the auth token to use. If it is unset, there is no auth.

func WithLogger

func WithLogger(logger log.Logger) Option

WithLogger sets the logger to use.

func WithPrefix

func WithPrefix(prefix string) Option

WithPrefix sets the URL prefix to use.

type Server

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

Server is the debug server struct. It should be created through StartServer.

func StartServer

func StartServer(opts ...Option) (*Server, error)

StartServer creates and starts a new debug server using the provided functional Options.

func (*Server) Shutdown

func (s *Server) Shutdown() error

Shutdown stops the running debug server.

func (*Server) Start

func (s *Server) Start() error

Jump to

Keyboard shortcuts

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