2019-06-06 10:50:25 +02:00
|
|
|
// Package proxy is a transparent proxy built on the go-micro/server
|
|
|
|
package proxy
|
|
|
|
|
2019-06-06 18:49:41 +02:00
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
2020-01-30 13:39:00 +02:00
|
|
|
"github.com/micro/go-micro/v2/server"
|
2019-06-06 18:49:41 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
// Proxy can be used as a proxy server for go-micro services
|
|
|
|
type Proxy interface {
|
2019-11-25 18:31:43 +02:00
|
|
|
// ProcessMessage handles inbound messages
|
|
|
|
ProcessMessage(context.Context, server.Message) error
|
|
|
|
// ServeRequest handles inbound requests
|
2019-06-06 18:58:21 +02:00
|
|
|
ServeRequest(context.Context, server.Request, server.Response) error
|
2019-12-16 17:18:20 +02:00
|
|
|
// Name of the proxy protocol
|
|
|
|
String() string
|
2019-06-06 18:49:41 +02:00
|
|
|
}
|
2019-06-07 14:42:39 +02:00
|
|
|
|
|
|
|
var (
|
|
|
|
DefaultEndpoint = "localhost:9090"
|
|
|
|
)
|