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

Rename Go module to github.com/henrygd/beszel #542

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

IOAyman
Copy link

@IOAyman IOAyman commented Feb 9, 2025

I've noticed that Beszel isn't currently installable using go get. This PR proposes renaming the Go module from beszel to github.com/henrygd/beszel. This would make it much easier for developers to use Beszel as a library within their own Go projects with a simple go get github.com/henrygd/beszel.

I've made the necessary changes, but I'm open to feedback and happy to refine them further.

@gedw99
Copy link

gedw99 commented Feb 10, 2025

+1 Will make it easier to extend Beszel.

@henrygd
Copy link
Owner

henrygd commented Feb 11, 2025

I agree, but unfortunately the Go code is in the /beszel directory instead of the root, so we'd need to use github.com/henrygd/beszel/beszel instead of github.com/henrygd/beszel. Or maybe I could set up a vanity URL like pkg.beszel.dev that points to the subdirectory.

Not the greatest decision on my part. I didn't have a good understanding of how this worked when I started the project.

It's also not properly configured for use as a package since the agent and hub are internal.

I'll fix this, but it will be after the next release and after #539 is sorted out because I don't want to wreck that PR by changing the directory structure.

@gedw99
Copy link

gedw99 commented Feb 11, 2025

Or move the code in the beszel folder to the root path and delete the beszel folder.

Then the module path works with no fuss and it’s standard golang layout.

supplemental folder can stay where it is . go ignores it.

adjust https://github.com/henrygd/beszel/blob/main/.github/workflows/release.yml to the new path the the cmd , etc

@henrygd
Copy link
Owner

henrygd commented Feb 11, 2025

That's probably what we'll do, I'd just like get the next release out and the other PR merged before changing the structure.

This PR can stay open and I'll likely merge it as part of that process later in the week or next week.

@gedw99
Copy link

gedw99 commented Feb 11, 2025

Sweet :)

@IOAyman
Copy link
Author

IOAyman commented Feb 11, 2025

Thank you both for your input 🙏🏼 I didn't have a good understanding of how this worked as well, but I'm learning and am happy to help.

@gedw99
Copy link

gedw99 commented Feb 12, 2025

When it’s a standard golang project then adding nats will be pretty easy if your into the idea. It’s kind of impossible at the moment due to go module name.

then all an agent will do is put its data into nats .

then hub will get that data via nats and fill up the db.

that’s all there is to it. Nothing else changes .

You can blow away the db in the hub and the system can recreate itself off the nats stream if you want :)

You can move your agents to new servers with new ip addresses and nothing breaks , because nats is ip and topology agnostic .

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.

3 participants