receiver

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIBearerMiddleware added in v0.2.0

func APIBearerMiddleware(token string) func(http.Handler) http.Handler

APIBearerMiddleware wraps the UI+API mux. Static files and /api/health are exempt. /api/health seeds the spaniel_token cookie when a valid Authorization header is presented. All other /api/* and /ws paths require either the Authorization header or the cookie.

func BearerMiddleware added in v0.2.0

func BearerMiddleware(token string) func(http.Handler) http.Handler

BearerMiddleware rejects HTTP requests that don't carry a matching Authorization: Bearer header. Intended for OTLP receivers where there is no browser/cookie flow.

func UnaryBearerInterceptor added in v0.2.0

func UnaryBearerInterceptor(token string) grpc.UnaryServerInterceptor

UnaryBearerInterceptor is a gRPC server interceptor that validates the "authorization" metadata field (value: "Bearer <token>").

Types

type GRPCReceiver

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

func NewGRPCReceiver

func NewGRPCReceiver(pipeline *ingestion.Pipeline, opts ...grpc.ServerOption) *GRPCReceiver

func (*GRPCReceiver) ListenAndServe

func (r *GRPCReceiver) ListenAndServe(addr string) error

func (*GRPCReceiver) Serve added in v0.2.0

func (r *GRPCReceiver) Serve(lis net.Listener) error

Serve runs the gRPC server on an already-bound listener. Safe to call from multiple goroutines with different listeners (e.g. one per IP family).

func (*GRPCReceiver) Stop

func (r *GRPCReceiver) Stop()

type HTTPReceiver

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

func NewHTTPReceiver

func NewHTTPReceiver(pipeline *ingestion.Pipeline) *HTTPReceiver

func (*HTTPReceiver) HandleLogs

func (h *HTTPReceiver) HandleLogs(w http.ResponseWriter, r *http.Request)

func (*HTTPReceiver) HandleMetrics

func (h *HTTPReceiver) HandleMetrics(w http.ResponseWriter, r *http.Request)

func (*HTTPReceiver) HandleTraces

func (h *HTTPReceiver) HandleTraces(w http.ResponseWriter, r *http.Request)

func (*HTTPReceiver) SetForwarder

func (h *HTTPReceiver) SetForwarder(f *forwarder.Forwarder)

Jump to

Keyboard shortcuts

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