Help us shape the future of Go! Take the 2026 Go Developer Survey

handlers

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DigHandler

type DigHandler struct {
}

func (*DigHandler) ServeHTTP

func (h *DigHandler) ServeHTTP(resp http.ResponseWriter, req *http.Request)

type DownloadHandler

type DownloadHandler struct{}

func (*DownloadHandler) ServeHTTP

func (h *DownloadHandler) ServeHTTP(resp http.ResponseWriter, req *http.Request)

type InfoHandler

type InfoHandler struct {
	Port int
}

func (*InfoHandler) ServeHTTP

func (h *InfoHandler) ServeHTTP(resp http.ResponseWriter, req *http.Request)

type PingHandler

type PingHandler struct {
}

func (*PingHandler) ServeHTTP

func (h *PingHandler) ServeHTTP(resp http.ResponseWriter, req *http.Request)

type ProxyHandler

type ProxyHandler struct {
	Stats *Stats
}

func (*ProxyHandler) ServeHTTP

func (h *ProxyHandler) ServeHTTP(resp http.ResponseWriter, req *http.Request)

type Stats

type Stats struct {
	// Locker  sync.Locker
	Latency []float64 `json:"latency"`
	sync.RWMutex
}

func (*Stats) Add

func (s *Stats) Add(latency float64)

func (*Stats) Clear

func (s *Stats) Clear()

func (*Stats) GetLatency

func (s *Stats) GetLatency() []float64

type StatsHandler

type StatsHandler struct {
	Stats *Stats
}

func (*StatsHandler) ServeHTTP

func (h *StatsHandler) ServeHTTP(resp http.ResponseWriter, req *http.Request)

type UploadHandler

type UploadHandler struct{}

func (*UploadHandler) ServeHTTP

func (h *UploadHandler) ServeHTTP(resp http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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