proxy

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2019 License: Apache-2.0 Imports: 4 Imported by: 45

README

Go Proxy License GoDoc

Go Proxy is a proxy library for Go Micro.

Overview

Go Micro is a distributed systems framework for client/server communication. It handles the details around discovery, fault tolerance, rpc communication, etc. We may want to leverage this in broader ecosystems which make use of standard http or we may also want to offload a number of requirements to a single proxy.

Features

  • Transparent Proxy - Proxy requests to any micro services through a single location. Go Proxy enables you to write Go Micro proxies which handle and forward requests. This is good for incorporating wrappers.

  • Single Backend Router - Enable the single backend router to proxy directly to your local app. The proxy allows you to set a router which serves your backend service whether its http, grpc, etc.

  • Protocol Aware Handler - Set a request handler which speaks your app protocol to make outbound requests. Your app may not speak the MUCP protocol so it may be easier to translate internally.

  • Control Planes - Additionally we support use of control planes to offload many distributed systems concerns.

    • Consul - Using Connect-Native to provide secure mTLS.
    • NATS - Fully leveraging NATS as the control plane and data plane.

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

Types

type Proxy

type Proxy interface {
	options.Options
	// 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