debugger

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Must

func Must(options ...Option) *debugger

Must returns new configured debugger or panic if an error occurred.

func New

func New(options ...Option) (*debugger, error)

New returns new configured debugger or an error if something went wrong.

Types

type Listener

type Listener interface {
	net.Listener
}

A Listener is a generic network listener for stream-oriented protocols.

type Option

type Option func(*debugger) error

Option defines function to configure debugger.

func WithBuiltinServer

func WithBuiltinServer(config config.Server) Option

WithBuiltinServer configures debugger by built-in HTTP server.

func WithCustomListenerAndServer

func WithCustomListenerAndServer(listener Listener, server Server) Option

WithCustomListenerAndServer configures debugger by custom listener and server.

func WithSpecificHost added in v0.1.0

func WithSpecificHost(host string) Option

WithSpecificHost configures debugger by specific host.

type Server

type Server interface {
	// Serve accepts incoming connections on the Listener and serves them.
	Serve(net.Listener) error
	// RegisterOnShutdown registers a function to call on Shutdown.
	RegisterOnShutdown(func())
	// Shutdown tries to do a graceful shutdown.
	Shutdown(context.Context) error
}

A Server is a generic server to listen a network protocol. It is compatible with net/http.Server.

Jump to

Keyboard shortcuts

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