ui

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2020 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UI

type UI struct {
	Logger *log.Logger
	Port   int

	RoundTrips     map[string]*roundtrip.RoundTrip
	RoundTripsLock *sync.RWMutex

	Upgrader  websocket.Upgrader
	Conns     map[string]*websocket.Conn
	IsServing bool
}

func New

func New(logger *log.Logger, port int) *UI

func (*UI) AddRoundTrip

func (ui *UI) AddRoundTrip(id string, startTime, endTime time.Time, rawRequest, rawResponse []byte)

func (*UI) FetchRoundTrip

func (ui *UI) FetchRoundTrip(id string) (*roundtrip.RoundTrip, bool)

func (*UI) Handler

func (ui *UI) Handler() http.Handler

func (*UI) Log

func (ui *UI) Log(id string)

func (*UI) Middleware

func (ui *UI) Middleware(next http.Handler) http.Handler

func (*UI) Serve

func (ui *UI) Serve()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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