dogudp

package
v0.0.0-...-5e858b1 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultAddr = "0.0.0.0:8125"

Variables

This section is empty.

Functions

func DefaultErrHandler

func DefaultErrHandler(err error) error

func DefaultMetricHandler

func DefaultMetricHandler(metric dogproto.Metric) error

Types

type ErrHandler

type ErrHandler func(err error) error

type ErrListen

type ErrListen struct {
	Inner error
}

func (*ErrListen) Error

func (err *ErrListen) Error() string

func (*ErrListen) Unwrap

func (err *ErrListen) Unwrap() error

type ErrParse

type ErrParse struct {
	Inner error
}

func (*ErrParse) Error

func (err *ErrParse) Error() string

func (*ErrParse) Unwrap

func (err *ErrParse) Unwrap() error

type MetricHandler

type MetricHandler func(ctx context.Context, metric dogproto.Metric) (abort error)

func MultiHandler

func MultiHandler(handlers ...MetricHandler) MetricHandler

type Server

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

func Listen

func Listen(
	ctx context.Context,
	addr string,
	metricHandler MetricHandler,
	errHandler ErrHandler,
) (*Server, error)

func ListenUDP

func ListenUDP(
	ctx context.Context,
	addr *net.UDPAddr,
	metricHandler MetricHandler,
	errHandler ErrHandler,
) (*Server, error)

func (*Server) Serve

func (srv *Server) Serve() error

Jump to

Keyboard shortcuts

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