Skip to content

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

@nyh

Description

@nyh

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions