proxy

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

README

micro proxy

The micro proxy is a cli proxy.

The micro proxy provides a http api which serves as a proxy for the cli where an environment is not directly accessible.

Getting Started

Usage

Install
go get -u github.com/micro/micro
Dependencies

The proxy uses go-micro which means it depends on service discovery.

Install consul

brew install consul
consul agent -dev
Run

The micro proxy runs on port 8081 by default.

Start the proxy

micro proxy
ACME

Serve securely by default using ACME via letsencrypt

MICRO_ENABLE_ACME=true micro proxy

Optionally specify a host whitelist

MICRO_ENABLE_ACME=true MICRO_ACME_HOSTS=example.com,api.example.com micro proxy 

Proxy CLI

To use the proxy with the CLI specify it's address

MICRO_PROXY_ADDRESS=127.0.0.1:8081 micro list services
MICRO_PROXY_ADDRESS=127.0.0.1:8081 micro call greeter Say.Hello '{"name": "john"}'

Documentation

Overview

Package proxy is a cli proxy

Index

Constants

This section is empty.

Variables

View Source
var (
	Name         = "go.micro.proxy"
	Address      = ":8081"
	BrokerPath   = "/broker"
	RegistryPath = "/registry"
	RPCPath      = "/rpc"
	CORS         = map[string]bool{"*": true}
)

Functions

func Commands

func Commands() []cli.Command

func Plugins

func Plugins() []plugin.Plugin

Plugins lists the sidecar plugins

func Register

func Register(pl plugin.Plugin) error

Register registers an sidecar plugin

Types

This section is empty.

Jump to

Keyboard shortcuts

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