summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/reverseproxy
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2019-06-14 11:58:28 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2019-06-14 11:58:28 -0600
commit5137859e47678aae81e178ca7d164f9e2b4e3121 (patch)
treef0e5cb9b9a4ad5dc03b53127fcea2a536bd6ee27 /modules/caddyhttp/reverseproxy
parentb8e7453fef3dac6036403bc384eec96becff5114 (diff)
Rename caddy2 -> caddy
Removes the version from the package name
Diffstat (limited to 'modules/caddyhttp/reverseproxy')
-rwxr-xr-xmodules/caddyhttp/reverseproxy/module.go4
-rwxr-xr-xmodules/caddyhttp/reverseproxy/upstream.go8
2 files changed, 6 insertions, 6 deletions
diff --git a/modules/caddyhttp/reverseproxy/module.go b/modules/caddyhttp/reverseproxy/module.go
index 76c487f..ecb5353 100755
--- a/modules/caddyhttp/reverseproxy/module.go
+++ b/modules/caddyhttp/reverseproxy/module.go
@@ -1,12 +1,12 @@
package reverseproxy
import (
- "github.com/caddyserver/caddy2"
+ "github.com/caddyserver/caddy"
)
// Register caddy module.
func init() {
- caddy2.RegisterModule(caddy2.Module{
+ caddy.RegisterModule(caddy.Module{
Name: "http.responders.reverse_proxy",
New: func() interface{} { return new(LoadBalanced) },
})
diff --git a/modules/caddyhttp/reverseproxy/upstream.go b/modules/caddyhttp/reverseproxy/upstream.go
index db03954..171f343 100755
--- a/modules/caddyhttp/reverseproxy/upstream.go
+++ b/modules/caddyhttp/reverseproxy/upstream.go
@@ -14,7 +14,7 @@ import (
"sync/atomic"
"time"
- "github.com/caddyserver/caddy2"
+ "github.com/caddyserver/caddy"
)
// CircuitBreaker defines the functionality of a circuit breaker module.
@@ -72,7 +72,7 @@ var (
)
// NewLoadBalancedReverseProxy returns a collection of Upstreams that are to be loadbalanced.
-func NewLoadBalancedReverseProxy(lb *LoadBalanced, ctx caddy2.Context) error {
+func NewLoadBalancedReverseProxy(lb *LoadBalanced, ctx caddy.Context) error {
// set defaults
if lb.NoHealthyUpstreamsMessage == "" {
lb.NoHealthyUpstreamsMessage = msgNoHealthyUpstreams
@@ -110,7 +110,7 @@ func NewLoadBalancedReverseProxy(lb *LoadBalanced, ctx caddy2.Context) error {
var cb CircuitBreaker
if uc.CircuitBreaker != nil {
- if _, err := caddy2.GetModule(cbModule); err == nil {
+ if _, err := caddy.GetModule(cbModule); err == nil {
val, err := ctx.LoadModule(cbModule, uc.CircuitBreaker)
if err == nil {
cbv, ok := val.(CircuitBreaker)
@@ -191,7 +191,7 @@ func (lb *LoadBalanced) Cleanup() error {
}
// Provision sets up a new loadbalanced reverse proxy.
-func (lb *LoadBalanced) Provision(ctx caddy2.Context) error {
+func (lb *LoadBalanced) Provision(ctx caddy.Context) error {
return NewLoadBalancedReverseProxy(lb, ctx)
}