http

package
v0.14.1-0...-915d78e Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTP

type HTTP struct {
	// contains filtered or unexported fields
}

HTTP receive metrics from HTTP requests

func (*HTTP) Addr

func (rcv *HTTP) Addr() net.Addr

Addr returns binded socket address. For bind port 0 in tests

func (*HTTP) InitPrometheus

func (rcv *HTTP) InitPrometheus(reg prometheus.Registerer)

InitPrometheus is a stub for the receiver prom metrics. Required to satisfy Receiver interface.

func (*HTTP) ServeHTTP

func (rcv *HTTP) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*HTTP) Stat

func (rcv *HTTP) Stat(send helper.StatCallback)

func (*HTTP) Stop

func (rcv *HTTP) Stop()

type Options

type Options struct {
	Listen         string `toml:"listen"`
	MaxMessageSize uint32 `toml:"max-message-size"`
}

func NewOptions

func NewOptions() *Options

Jump to

Keyboard shortcuts

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