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

add a subcommand for the connmgr #4308

Closed
wants to merge 1 commit into from
Closed

Conversation

whyrusleeping
Copy link
Member

License: MIT
Signed-off-by: Jeromy jeromyj@gmail.com

@whyrusleeping
Copy link
Member Author

(note: this relies on uncommitted changes to the connmgr lib)

cmgr := n.PeerHost.ConnManager()
switch cmgr := cmgr.(type) {
case nil:
infos["type"] = "<nil>"
Copy link
Member

Choose a reason for hiding this comment

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

Is distinguishing between these two cases really useful? Users aren't going to know what <nil> means.

Copy link
Member Author

Choose a reason for hiding this comment

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

They shouldnt ever see "nil", Everything currently will either return a NullConnMgr or a BasicConnMgr. So maybe I should remove it?

Copy link
Member

Choose a reason for hiding this comment

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

Probably. I'd fail with an error if this isn't supposed to happen.

infos["type"] = "basic"

inf := cmgr.GetInfo()
infos["lowWater"] = inf.LowWater
Copy link
Member

Choose a reason for hiding this comment

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

I assume these are supposed to be human readable keys? If so, we should probably just say things like "Low Watermark" instead.

Copy link
Member

Choose a reason for hiding this comment

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

Those will be the result of JSON endpoint. We can create mappings in TextMarshaller.

@Kubuxu
Copy link
Member

Kubuxu commented Oct 23, 2017

@whyrusleeping so how about making human readable format having really human readable keys (lowWater => Low Watermark and so on)?

@whyrusleeping whyrusleeping force-pushed the feat/connmgr-cmds branch 2 times, most recently from 27a5321 to 13beb2e Compare October 25, 2017 09:56
@whyrusleeping
Copy link
Member Author

@GitCop what is your problem? I have that.

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
@whyrusleeping whyrusleeping changed the base branch from feat/connmgr to master October 25, 2017 12:02
@whyrusleeping whyrusleeping added this to the go-ipfs 0.4.14 milestone Nov 16, 2017
@whyrusleeping
Copy link
Member Author

Can someone take this over for me?

@lidel
Copy link
Member

lidel commented Dec 6, 2022

ConnMgr work continued in #9420

@lidel lidel closed this Dec 6, 2022
@lidel lidel deleted the feat/connmgr-cmds branch December 6, 2022 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants