[GODRIVER-141] Expose local address in conn package Created: 28/Nov/17  Updated: 28/Oct/23  Resolved: 06/Dec/17

Status: Closed
Project: Go Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 0.0.1

Type: New Feature Priority: Minor - P4
Reporter: Martin Zhang Assignee: Martin Zhang
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends

 Description   

For the BI connector, we're looking to kill long running ops on mongo by matching on the client field on current ops. We then need a way to expose the local address from the connection abstraction.



 Comments   
Comment by Githook User [ 06/Dec/17 ]

Author:

{'name': 'Martin Zhang', 'username': 'MartyZhang', 'email': 'Martin.zhang@10gen.com'}

Message: GODRIVER-141: Expose local address in conn package
Branch: master
https://github.com/10gen/mongo-go-driver/commit/fa5e1f1029759ff5cae9022e7b86745578f2735b

Comment by Adinoyi Omuya [ 28/Nov/17 ]

Will do, thx.

Comment by David Golden [ 28/Nov/17 ]

The BIC has it's own connection pools, right? So you should already be able to pull LocalAddr off the connections. If the net.Conn is private, you can send a PR to add a LocalAddr method on connections to grab the underlying LocalAddr.

Comment by Adinoyi Omuya [ 28/Nov/17 ]

That's true, but the BI Connector supports MongoDB versions >= 3.2 so we need an alternative for our users who aren't using 3.6.

I don't know if other drivers expose host/port - however, a lot of the BIC's needs are very uncommon.

Comment by David Golden [ 28/Nov/17 ]

I suspect that as of 3.6, using sessions will be the better way to do this.

Do other drivers expose client host/port?

I'll keep this open for now, but I think it's very low priority.

Generated at Thu Feb 08 08:33:37 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.