proxy

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2019 License: Apache-2.0 Imports: 5 Imported by: ? modules, 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 proxy is a transparent proxy built on the go-micro/server

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultEndpoint = "localhost:9090"
)

Functions

func WithClient

func WithClient(c client.Client) options.Option

WithClient sets the client

func WithEndpoint

func WithEndpoint(e string) options.Option

WithEndpoint sets a proxy endpoint

func WithLink(name string, c client.Client) options.Option

WithLink sets a link for outbound requests

func WithRouter

func WithRouter(r router.Router) options.Option

WithRouter specifies the router to use

Types

type Proxy

type Proxy interface {
	options.Options
	// SendRequest honours the client.Router interface
	SendRequest(context.Context, client.Request, client.Response) error
	// ServeRequest honours the server.Router interface
	ServeRequest(context.Context, server.Request, server.Response) error
}

Proxy can be used as a proxy server for go-micro services

Directories

Path Synopsis
Package grpc transparently forwards the grpc protocol using a go-micro client.
Package grpc transparently forwards the grpc protocol using a go-micro client.
Package http provides a micro rpc to http proxy
Package http provides a micro rpc to http proxy
Package mucp transparently forwards the incoming request using a go-micro client.
Package mucp transparently forwards the incoming request using a go-micro client.

Jump to

Keyboard shortcuts

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