RecreateClient closes the current client and creates a new client for the session.
()
| 352 | |
| 353 | // RecreateClient closes the current client and creates a new client for the session. |
| 354 | func (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 | |
| 365 | func (s *Session) currentPriority() pb.RequestOptions_Priority { |
| 366 | if s.tc != nil { |
no test coverage detected