From 8b2dbc52ec6bc0359b4b8c47a3f9835e9460649e Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Tue, 7 Apr 2020 08:33:45 -0600 Subject: core: Rename ParsedAddress -> NetworkAddress --- modules/caddyhttp/autohttps.go | 2 +- modules/caddyhttp/reverseproxy/hosts.go | 2 +- modules/caddyhttp/reverseproxy/selectionpolicies.go | 4 ++-- modules/logging/netwriter.go | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'modules') diff --git a/modules/caddyhttp/autohttps.go b/modules/caddyhttp/autohttps.go index 00853f8..ecb988a 100644 --- a/modules/caddyhttp/autohttps.go +++ b/modules/caddyhttp/autohttps.go @@ -82,7 +82,7 @@ func (app *App) automaticHTTPSPhase1(ctx caddy.Context, repl *caddy.Replacer) er // this maps domain names for automatic HTTP->HTTPS // redirects to their destination server address - redirDomains := make(map[string]caddy.ParsedAddress) + redirDomains := make(map[string]caddy.NetworkAddress) for srvName, srv := range app.Servers { // as a prerequisite, provision route matchers; this is diff --git a/modules/caddyhttp/reverseproxy/hosts.go b/modules/caddyhttp/reverseproxy/hosts.go index 87139c3..23759d1 100644 --- a/modules/caddyhttp/reverseproxy/hosts.go +++ b/modules/caddyhttp/reverseproxy/hosts.go @@ -138,7 +138,7 @@ func (u *Upstream) Full() bool { // field is used. Note that the returned value is not a pointer. func (u *Upstream) fillDialInfo(r *http.Request) (DialInfo, error) { repl := r.Context().Value(caddy.ReplacerCtxKey).(*caddy.Replacer) - var addr caddy.ParsedAddress + var addr caddy.NetworkAddress if u.LookupSRV != "" { // perform DNS lookup for SRV records and choose one diff --git a/modules/caddyhttp/reverseproxy/selectionpolicies.go b/modules/caddyhttp/reverseproxy/selectionpolicies.go index 8a32135..7c36dec 100644 --- a/modules/caddyhttp/reverseproxy/selectionpolicies.go +++ b/modules/caddyhttp/reverseproxy/selectionpolicies.go @@ -370,12 +370,12 @@ func (s HeaderHashSelection) Select(pool UpstreamPool, req *http.Request) *Upstr } // UnmarshalCaddyfile sets up the module from Caddyfile tokens. -func (r *HeaderHashSelection) UnmarshalCaddyfile(d *caddyfile.Dispenser) error { +func (s *HeaderHashSelection) UnmarshalCaddyfile(d *caddyfile.Dispenser) error { for d.Next() { if !d.NextArg() { return d.ArgErr() } - r.Field = d.Val() + s.Field = d.Val() } return nil } diff --git a/modules/logging/netwriter.go b/modules/logging/netwriter.go index 7d2dafa..427bb75 100644 --- a/modules/logging/netwriter.go +++ b/modules/logging/netwriter.go @@ -31,7 +31,7 @@ func init() { type NetWriter struct { Address string `json:"address,omitempty"` - addr caddy.ParsedAddress + addr caddy.NetworkAddress } // CaddyModule returns the Caddy module information. -- cgit v1.2.3