proxy

package
v2.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2025 License: Apache-2.0 Imports: 11 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 added in v2.2.0

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.

func (*Handler) Handle added in v2.2.0

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

Handle processes a request by sending it to another wire protocol compatible service.

func (*Handler) Run added in v2.2.0

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

Run runs the handler until ctx is canceled.

When this method returns, handler is stopped.

type NewOpts added in v2.5.0

type NewOpts struct {
	Addr     string
	CertFile string
	KeyFile  string
	CAFile   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