Skip to content

Commit

Permalink
don't expose newClientWithKeyspaceName
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Leung <[email protected]>
  • Loading branch information
rleungx committed May 18, 2023
1 parent 2c19715 commit d33abc9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ func NewClientWithContext(
}

// NewClientWithKeyspace creates a client with context and the specified keyspace id.
// And now, it's only for test purpose.
func NewClientWithKeyspace(
ctx context.Context, keyspaceID uint32, svrAddrs []string,
security SecurityOption, opts ...ClientOption,
Expand Down Expand Up @@ -456,14 +457,14 @@ func NewClientWithAPIContext(
if keyspaceName == "" {
keyspaceName = defaultKeyspaceName
}
return NewClientWithKeyspaceName(ctx, keyspaceName, svrAddrs, security, opts...)
return newClientWithKeyspaceName(ctx, keyspaceName, svrAddrs, security, opts...)
default:
return nil, errors.Errorf("[pd] invalid API version %d", apiVersion)
}
}

// NewClientWithKeyspaceName creates a client with context and the specified keyspace name.
func NewClientWithKeyspaceName(
// newClientWithKeyspaceName creates a client with context and the specified keyspace name.
func newClientWithKeyspaceName(
ctx context.Context, keyspaceName string, svrAddrs []string,
security SecurityOption, opts ...ClientOption,
) (Client, error) {
Expand Down

0 comments on commit d33abc9

Please sign in to comment.