backend

package
v0.11.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2021 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package backend implements common proxy backends satisfying proxy.Backend interface

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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(streaming bool, resp []byte) ([]byte, error)

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

func (*Local) BuildError

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

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

func (*Local) GetConnection

func (l *Local) GetConnection(ctx context.Context) (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