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

Refactor driver selection to allow registering new drivers #325

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

sambhav
Copy link
Contributor

@sambhav sambhav commented Sep 25, 2024

This PR refactors the driver code to allow users to register their own drivers if they wish to.

It also consolidates the I/O that is expected from each driver constructor to a consistent interface.

Fixes #76 as well

pkg/drivers/registry.go Outdated Show resolved Hide resolved
Copy link
Member

@brandond brandond left a comment

Choose a reason for hiding this comment

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

another nit

pkg/drivers/registry.go Outdated Show resolved Hide resolved
pkg/drivers/registry.go Outdated Show resolved Hide resolved
@brandond
Copy link
Member

Looks like it's still not formatted properly:

#12 1.968 pkg/drivers/generic/generic.go:28: File is not `gofmt`-ed with `-s` (gofmt)

@sambhav
Copy link
Contributor Author

sambhav commented Sep 25, 2024

Should work now, rebased and squashed all the fixes.

@sambhav
Copy link
Contributor Author

sambhav commented Sep 25, 2024

Hmm

msg="building kine: no default driver found"

@sambhav sambhav force-pushed the refactor-generic branch 6 times, most recently from 83fc148 to 5016d49 Compare September 25, 2024 20:12
Signed-off-by: Sambhav Kothari <skothari44@bloomberg.net>
@sambhav
Copy link
Contributor Author

sambhav commented Sep 26, 2024

@brandond ok to merge this? Would you also be open to cutting a release?

@brandond brandond merged commit 133503d into k3s-io:master Sep 26, 2024
3 checks passed
@sambhav sambhav deleted the refactor-generic branch September 27, 2024 01:55
brandond added a commit to brandond/k3s that referenced this pull request Oct 2, 2024
Support for 'sqlite' as the endpoint was removed in
k3s-io/kine#320 and the constant removed in
k3s-io/kine#325

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
brandond added a commit to k3s-io/k3s that referenced this pull request Oct 3, 2024
Support for 'sqlite' as the endpoint was removed in
k3s-io/kine#320 and the constant removed in
k3s-io/kine#325

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
brandond added a commit to brandond/rke2 that referenced this pull request Oct 4, 2024
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
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.

Consider recognize postgresql:// network protocol
3 participants