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

basichost: refactor BasicHost construction #197

Merged
merged 1 commit into from
May 31, 2017

Conversation

ghost
Copy link

@ghost ghost commented May 30, 2017


There were previously 4 different ways of passing various options
into BasicHost construction.

  1. Function parameters to New
  2. Option parameters to New
  3. Global variables, e.g. NegotiateTimeout
  4. Options struct, in the calling code in go-ipfs

This changeset deprecates all of these, and introduces the HostOpts
struct to replace them. It also introduces a new constructor called
NewHost, which accepts a *HostOpts.

The old New constructor continues to work the same way,
but is from now on deprecated too.

@ghost ghost requested review from hsanjuan, whyrusleeping and Kubuxu May 30, 2017 23:35
@ghost ghost added the status/in-progress In progress label May 30, 2017
@ghost
Copy link
Author

ghost commented May 30, 2017

Oh, I shall add some tests for NewHost while I'm at it...

There were previously 4 different ways of passing various options
into BasicHost construction.

1. Function parameters to New
2. Option parameters to New
3. Global variables, e.g. NegotiateTimeout
4. Options struct, in the calling code in go-ipfs

This changeset deprecated all of these, and introduces the HostOpts
struct to replace them. It also introduces a new constructor called
NewHost, which accepts a *HostOpts.

The old New constructor continues to work the same way,
but is from now on deprecated too.
Copy link
Contributor

@whyrusleeping whyrusleeping left a comment

Choose a reason for hiding this comment

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

LGTM, rfm?

@whyrusleeping whyrusleeping merged commit 08c8d6f into master May 31, 2017
@whyrusleeping whyrusleeping deleted the feat/refactor-basichost-new branch May 31, 2017 19:56
@whyrusleeping whyrusleeping removed the status/in-progress In progress label May 31, 2017
@ghost ghost mentioned this pull request Aug 29, 2017
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.

1 participant