mirror of
https://github.com/go-micro/go-micro.git
synced 2024-12-24 10:07:04 +02:00
Add proxy interface
This commit is contained in:
parent
94772a8cc7
commit
c60b5a45bb
@ -1,3 +1,18 @@
|
|||||||
// Package proxy is a transparent proxy built on the go-micro/server
|
// Package proxy is a transparent proxy built on the go-micro/server
|
||||||
package proxy
|
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
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user