micro/proxy/proxy.go

23 lines
534 B
Go
Raw Normal View History

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