proxy

package
v1.24.3 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package proxy handles requests by sending them to another wire protocol compatible service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

Handler handles requests by sending them to another wire protocol compatible service.

func New

func New(opts *NewOpts) (*Handler, error)

New creates a new Handler for a service with given address. Handler.Run must be called on the returned value.

func (*Handler) Collect

func (h *Handler) Collect(ch chan<- prometheus.Metric)

Collect implements prometheus.Collector.

func (*Handler) Describe

func (h *Handler) Describe(ch chan<- *prometheus.Desc)

Describe implements prometheus.Collector.

func (*Handler) Handle

func (h *Handler) Handle(ctx context.Context, req *middleware.Request) (resp *middleware.Response, err error)

Handle implements middleware.Handler by sending it to another wire protocol compatible service.

func (*Handler) Run

func (h *Handler) Run(ctx context.Context)

Run implements middleware.Handler.

type NewOpts

type NewOpts struct {
	Addr        string
	TLSCertFile string
	TLSKeyFile  string
	TLSCAFile   string

	L *slog.Logger
}

NewOpts represents handler configuration.

Jump to

Keyboard shortcuts

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