handler

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2020 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleFile

func HandleFile(
	ctx context.Context,
	file io.Reader,
	parseChan chan string,
)

HandleFile Loads a file and reads line by line

func HandleRawUDPPacket

func HandleRawUDPPacket(
	ctx context.Context,
	rawData []byte,
	parseChan chan string,
)

HandleRawUDPPacket process udp packets in the form of byte arrays

func HandleTCPConnection

func HandleTCPConnection(
	ctx context.Context,
	conn net.Conn,
	parseChan chan string,
)

HandleTCPConnection process messages from tcp connection

func HandleUDPConnection

func HandleUDPConnection(
	ctx context.Context,
	conn net.PacketConn,
	parseChan chan string,
)

HandleUDPConnection processes messages from udp connections

func RegisterMetrics

func RegisterMetrics()

RegisterMetrics for collection

Types

type PrometheusRemoteWrite

type PrometheusRemoteWrite struct {
	http.Handler
	// contains filtered or unexported fields
}

PrometheusRemoteWrite https handler

func HandlePrometheusConnection

func HandlePrometheusConnection(
	parseChan chan parser.PromMetric,
) *PrometheusRemoteWrite

HandlePrometheusConnection returns http hander for prometheus remote writes

func (*PrometheusRemoteWrite) ServeHTTP

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

Jump to

Keyboard shortcuts

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