Version: v0.0.0-...-e689ca2 Latest Latest

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

Go to latest
Published: Aug 3, 2021 License: MIT Imports: 11 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


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

Source Files

Jump to

Keyboard shortcuts

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