backend

package
v1.14.5 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: MPL-2.0 Imports: 10 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package backend implements common proxy backends satisfying proxy.Backend interface

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OutgoingMetadata added in v1.12.12

func OutgoingMetadata(ctx context.Context) metadata.MD

OutgoingMetadata builds the metadata for a request proxied to a backend.

It contains the allowlisted keys of the incoming request metadata, plus the roles as resolved by this proxy instance for this request.

Types

type Local

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

Local implements local backend (proxying one2one to local service).

func NewLocal

func NewLocal(name, socketPath string) *Local

NewLocal builds new Local backend.

func (*Local) AppendInfo

func (l *Local) AppendInfo(_ bool, resp []byte) ([]byte, error)

AppendInfo is called to enhance response from the backend with additional data.

func (*Local) BuildError

func (l *Local) BuildError(bool, error) ([]byte, error)

BuildError is called to convert error from upstream into response field.

func (*Local) Close added in v1.13.0

func (l *Local) Close() error

Close the backend connection.

func (*Local) GetConnection

func (l *Local) GetConnection(ctx context.Context, _ string) (context.Context, *grpc.ClientConn, error)

GetConnection returns a grpc connection to the backend.

func (*Local) String

func (l *Local) String() string

Jump to

Keyboard shortcuts

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