Peter Kurfer
108444e094
- remove plugin API due to incompatibility issues - add Docker build to GitHub Actions - add custom container friendly config file
22 lines
437 B
Go
22 lines
437 B
Go
package http_proxy
|
|
|
|
import (
|
|
"github.com/baez90/inetmock/pkg/api"
|
|
"github.com/baez90/inetmock/pkg/logging"
|
|
"go.uber.org/zap"
|
|
"gopkg.in/elazarl/goproxy.v1"
|
|
)
|
|
|
|
func init() {
|
|
logger, _ := logging.CreateLogger()
|
|
logger = logger.With(
|
|
zap.String("ProtocolHandler", name),
|
|
)
|
|
|
|
api.Registry().RegisterHandler(name, func() api.ProtocolHandler {
|
|
return &httpProxy{
|
|
logger: logger,
|
|
proxy: goproxy.NewProxyHttpServer(),
|
|
}
|
|
})
|
|
}
|