From 5137859e47678aae81e178ca7d164f9e2b4e3121 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Fri, 14 Jun 2019 11:58:28 -0600 Subject: Rename caddy2 -> caddy Removes the version from the package name --- modules/caddyhttp/reverseproxy/module.go | 4 ++-- modules/caddyhttp/reverseproxy/upstream.go | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'modules/caddyhttp/reverseproxy') 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) } -- cgit v1.2.3