MCPcopy Create free account
hub / github.com/cloudspannerecosystem/spanner-cli / RecreateClient

Method RecreateClient

session.go:354–363  ·  view source on GitHub ↗

RecreateClient closes the current client and creates a new client for the session.

()

Source from the content-addressed store, hash-verified

352
353// RecreateClient closes the current client and creates a new client for the session.
354func (s *Session) RecreateClient() error {
355 ctx := context.Background()
356 c, err := spanner.NewClientWithConfig(ctx, s.DatabasePath(), s.clientConfig, s.clientOpts...)
357 if err != nil {
358 return err
359 }
360 s.client.Close()
361 s.client = c
362 return nil
363}
364
365func (s *Session) currentPriority() pb.RequestOptions_Priority {
366 if s.tc != nil {

Callers 1

RunInteractiveMethod · 0.80

Calls 2

DatabasePathMethod · 0.95
CloseMethod · 0.45

Tested by

no test coverage detected