Skip to content
This repository has been archived by the owner on Aug 25, 2020. It is now read-only.

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

Open
nyh opened this issue Jul 22, 2020 · 0 comments

Comments

@nyh
Copy link
Owner

nyh commented Jul 22, 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.

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

No branches or pull requests

1 participant