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

feat: golang client POC #3

Merged
merged 2 commits into from
Feb 1, 2024
Merged

Conversation

manast
Copy link
Contributor

@manast manast commented Oct 2, 2023

No description provided.

@ghost
Copy link

ghost commented Oct 5, 2023

Is this a Go package that can be imported externally, or is it just an internal client example? If it can be imported externally, the module path has been set as a vanity URL. If a vanity URL redirector like Gooogle Cloud Platform's Go Vanity URLs server hasn't been set up, go get taskforce.sh/bullmq_proxy_client won't redirect to Git. At this point, even if "taskforce.sh/bullmq_proxy_client" is invalid, it doesn't redirect anywhere, I just wanted to provide this information.

@manast
Copy link
Contributor Author

manast commented Oct 5, 2023

This Go package is supposed to be imported externally. What changes are needed to make this happen?

@ghost
Copy link

ghost commented Oct 5, 2023

As I mentioned, Google Cloud Platform has a simple server implementation for this purpose that can be used. It can be proxied under the domain taskforce.sh, but instead of proxying, it can be served as a subdomain with a basic instance, like "go.taskforce.sh/bullmq_proxy_client".

@ghost
Copy link

ghost commented Oct 5, 2023

Things you probably need to change if you're going to use a subdomain: modify the module path in go.mod to "go.taskforce.sh/bullmq_proxy_client" and add a path like "bullmq_proxy_client" in the vanity.yaml file of the govanityurl server, directing this path to the folder (in GitHub) where the client is located.

@manast
Copy link
Contributor Author

manast commented Oct 5, 2023

What about using github.com as domain? is it possible?

@ghost
Copy link

ghost commented Oct 5, 2023

What about using github.com as domain? is it possible?

It just needs to be changed to "github.com/taskforcesh/bullmq-proxy/clients/golang" as the module path.

@manast
Copy link
Contributor Author

manast commented Oct 5, 2023

What about the path? as the module is inside clients/golang subdirectory?

@@ -0,0 +1,5 @@
module taskforce.sh/bullmq_proxy_client
Copy link

Choose a reason for hiding this comment

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

If it is going to be served with GitHub, this should be changed to "github.com/taskforcesh/bullmq-proxy/clients/golang" here, and similarly, all imports should be changed accordingly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see. It would be nicer not to need to append the path to the module as this is a monorepo with packages for several platforms, I guess that would require a different solution, like serving it from a different host right?

Copy link

Choose a reason for hiding this comment

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

You can also serve the package directly from another repo host (maybe github.com/taskforcesh/proxy-go)

Copy link

Choose a reason for hiding this comment

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

In monorepo it is required to specify the package path

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I prefer the mono repo approach as it will be easier to keep the go library and the proxy in sync.

Copy link

Choose a reason for hiding this comment

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

I added what you need directly in the first comment

Copy link

@ghost ghost Oct 5, 2023

Choose a reason for hiding this comment

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

Copy link
Contributor Author

@manast manast Oct 5, 2023

Choose a reason for hiding this comment

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

I understand. I rather not put the extra burden of maintaining an extra host, even if it is a lambda... these things breaks sometimes and could affect users when they need it the most. So I guess I will take the github route for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for all the feedback :)

Copy link

Choose a reason for hiding this comment

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

You're welcome, I will contribute for more clients soon!

@manast manast merged commit 5c28a42 into main Feb 1, 2024
1 check passed
@manast manast deleted the feat/add-experimental-golang-client branch February 1, 2024 22:17
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.

None yet

1 participant