routes

package
v0.0.0-...-34c5bf1 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	TemplateDirectory string
	LogRepository     *repository.LogRepository
	Watcher           *watch.Watcher
}

Handler handles requests

func (*Handler) HandleRead

func (h *Handler) HandleRead(w http.ResponseWriter, r *http.Request)

HandleRead renders an HTML page with log lines according to the query in the request

func (*Handler) HandleWebSocket

func (h *Handler) HandleWebSocket(w http.ResponseWriter, r *http.Request)

HandleWebSocket sends new log lines over a web socket

func (*Handler) HandleWrite

func (h *Handler) HandleWrite(w http.ResponseWriter, r *http.Request)

HandleWrite writes a slog line for testing purposes

Jump to

Keyboard shortcuts

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