Skip to content

Commit

Permalink
googlec2p: remove support for the experimental scheme (#6645)
Browse files Browse the repository at this point in the history
  • Loading branch information
easwars authored Sep 25, 2023
1 parent a758b62 commit 4ced601
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions xds/googledirectpath/googlec2p.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,8 @@ import (
)

const (
c2pScheme = "google-c2p"
c2pExperimentalScheme = "google-c2p-experimental"
c2pAuthority = "traffic-director-c2p.xds.googleapis.com"
c2pScheme = "google-c2p"
c2pAuthority = "traffic-director-c2p.xds.googleapis.com"

tdURL = "dns:///directpath-pa.googleapis.com"
httpReqTimeout = 10 * time.Second
Expand Down Expand Up @@ -77,18 +76,10 @@ var (
)

func init() {
resolver.Register(c2pResolverBuilder{
scheme: c2pScheme,
})
// TODO(apolcyn): remove this experimental scheme before the 1.52 release
resolver.Register(c2pResolverBuilder{
scheme: c2pExperimentalScheme,
})
resolver.Register(c2pResolverBuilder{})
}

type c2pResolverBuilder struct {
scheme string
}
type c2pResolverBuilder struct{}

func (c2pResolverBuilder) Build(t resolver.Target, cc resolver.ClientConn, opts resolver.BuildOptions) (resolver.Resolver, error) {
if t.URL.Host != "" {
Expand Down Expand Up @@ -165,7 +156,7 @@ func (c2pResolverBuilder) Build(t resolver.Target, cc resolver.ClientConn, opts
}

func (b c2pResolverBuilder) Scheme() string {
return b.scheme
return c2pScheme
}

type c2pResolver struct {
Expand Down

0 comments on commit 4ced601

Please sign in to comment.