From c60b5a45bbae592d737d3b7504abbdcd5e65181f Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Thu, 6 Jun 2019 17:49:41 +0100 Subject: [PATCH] Add proxy interface --- proxy/proxy.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/proxy/proxy.go b/proxy/proxy.go index e0a2b54e..ff03a081 100644 --- a/proxy/proxy.go +++ b/proxy/proxy.go @@ -1,3 +1,18 @@ // Package proxy is a transparent proxy built on the go-micro/server package proxy +import ( + "context" + + "github.com/micro/go-micro/init" + "github.com/micro/go-micro/server" +) + +// Proxy can be used as a proxy server for go-micro services +type Proxy interface { + init.Options + // ServeRequest will serve a request + ServeRequest(context.Context, Request, Response) error + // run the proxy + Run() error +}