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

Go library doesn't need fake URL - or should document better why it does need it. #1

Open
nyh opened this issue Aug 25, 2020 · 0 comments
Labels

Comments

@nyh
Copy link
Contributor

nyh commented Aug 25, 2020

To use the Go library, one uses

alternator_nodes := NewAlternatorNodes("http", 8000, []string {"127.0.0.1"})
sess := alternator_nodes.session("dog.scylladb.com", "alternator", "secret_pass")

But this "dog.scylladb.com" thing is not really needed... It's a left-over from the trick I used in Python where I monkey-patched a global function and had to make that global function still work also for non-fake URLs. In the Go implementation, we have a handler which will only be used for this specific session, so it doesn't care at all what is the URL.

But, that being said, this "dog.scylladb.com" string is currently still used for the "Host:" header. so maybe we still need to provide it! I'm not sure what we can put in the Host: header if we don't supply this string! If we keep this string, we need to document better its purpose.

@nyh nyh added the go label Nov 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant