Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pool: add Instance type #373

Merged

Conversation

oleg-jukovec
Copy link
Collaborator

The type Instance:

type Instance struct {
	// Name is an unique name of the instance.
	Name   string
	// Dialer will be used to create a connection to the instance.
	Dialer tarantool.Dialer
	// Opts will be used to specify a connection options.
	Opts   tarantool.Opts
}

The type allows to specify a dialer and connection options per a pool instance. It is used in pool.Connect, pool.ConnectWithOpts and pool.Add to specify an instance configuration now.

Closes #356

TestConn_ReadWrite causes endless read/write in goroutines after
execution of the test. The patch fixes the problem.
The type Instance:
```
type Instance struct {
	// Name is an unique name of the instance.
	Name   string
	// Dialer will be used to create a connection to the instance.
	Dialer tarantool.Dialer
	// Opts will be used to specify a connection options.
	Opts   tarantool.Opts
}
```

The type allows to specify a dialer and connection options per a
pool instance. It is used in `pool.Connect`, `pool.ConnectWithOpts`
and `pool.Add` to specify an instance configuration now.

Closes #356
Copy link

@askalt askalt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@oleg-jukovec oleg-jukovec merged commit b8d9914 into master Jan 26, 2024
22 checks passed
@oleg-jukovec oleg-jukovec deleted the oleg-jukovec/gh-356-pool-connect-update-interface branch January 26, 2024 09:20
Copy link

@DerekBum DerekBum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the patch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

v2: improve pool.Connect interface
3 participants