Skip to content

Commit 09166b6

Browse files
authored
cleanup: remove unused constants in generic xdsclient (#8315)
1 parent e3f13e7 commit 09166b6

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

xds/internal/clients/xdsclient/xdsclient.go

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,11 @@ import (
5151
)
5252

5353
const (
54-
// NameForServer represents the value to be passed as name when creating an xDS
55-
// client from xDS-enabled gRPC servers. This is a well-known dedicated key
56-
// value, and is defined in gRFC A71.
57-
NameForServer = "#server"
58-
5954
defaultWatchExpiryTimeout = 15 * time.Second
6055
name = "xds-client"
6156
)
6257

6358
var (
64-
// ErrClientClosed is returned when the xDS client is closed.
65-
ErrClientClosed = errors.New("xds: the xDS client is closed")
66-
6759
defaultExponentialBackoff = backoff.DefaultExponential.Backoff
6860
)
6961

@@ -221,7 +213,7 @@ func (c *XDSClient) Close() {
221213
// A non-nil error is returned if an xdsChannel was not created.
222214
func (c *XDSClient) getChannelForADS(serverConfig *ServerConfig, callingAuthority *authority) (*xdsChannel, func(), error) {
223215
if c.done.HasFired() {
224-
return nil, nil, ErrClientClosed
216+
return nil, nil, errors.New("xds: the xDS client is closed")
225217
}
226218

227219
initLocked := func(s *channelState) {

0 commit comments

Comments
 (0)