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

Internal package not allowed #87

Closed
nlamirault opened this issue Oct 4, 2016 · 15 comments
Closed

Internal package not allowed #87

nlamirault opened this issue Oct 4, 2016 · 15 comments

Comments

@nlamirault
Copy link
Contributor

Hi i try to use speedtest as a library for a project.
I can't use sthttp package :

imports github.com/zpeters/speedtest/internal/sthttp: use of internal package not allowed

Do you think it is possible to refactor code without internal ?
Thanks.

@zpeters
Copy link
Owner

zpeters commented Oct 4, 2016

Definitely open to this but i don't have a lot of time lately. I'll keep this bug open and look at it when i have time.

Thank you,

@nlamirault
Copy link
Contributor Author

See #88

@zpeters
Copy link
Owner

zpeters commented Oct 6, 2016

Dude awesome thank you. Sorry there will be a slight delay but ill try to look over the merge in the next few days. Thanks!

@zpeters
Copy link
Owner

zpeters commented Oct 12, 2016

merged pr 88 and 89

@zpeters zpeters closed this as completed Oct 12, 2016
@zpeters zpeters reopened this Oct 14, 2016
@zpeters
Copy link
Owner

zpeters commented Oct 14, 2016

I noticed today that something in one of these patches broke a few things. it looks like the http timeouts aren't working and i think that is why it is randomly failing for some people. Also blacklisting isn't working . I tried to revert the PR's but i was only able to revert one. @nlamirault lamirault can you look at this?

@nlamirault
Copy link
Contributor Author

OK. I try to fix that.

@nlamirault
Copy link
Contributor Author

nlamirault commented Oct 17, 2016

Strange. I try some logs :

log.Printf("Keys: %s", viper.AllKeys())
log.Printf("Blacklist: %s", viper.GetString("blacklist"))

and :

$ bin/speedtest-v1.0.2-c-8-ga232615 -d -b http://paris1.speedtest.orange.fr/upload.php
2016/10/17 17:29:35 Keys: [numlatencytests algotype report httpdownloadtimeout ulsizes blacklist speedtestconfigurl numclosest reportchar httpconfigtimeout speedtestserversurl quiet httplatencytimeout dlsizes debug]
2016/10/17 17:29:35 Blacklist: 
2016/10/17 17:29:35 STClient: &sthttp.SpeedtestConfig{ConfigURL:"http://c.speedtest.net/speedtest-config.php?x=jgkIV7zvY5LZHhWB", ServersURL:"http://c.speedtest.net/speedtest-servers-static.php?x=9anLuNni9qiLXnWR", AlgoType:"max", NumClosest:3, NumLatencyTests:5, Interface:"", Blacklist:""}

Key "blacklist" seems present, but without value.

@zpeters
Copy link
Owner

zpeters commented Oct 17, 2016

try using a number for the black list parameter. you can get the server
number by first running speedtest -l

On Mon, Oct 17, 2016 at 10:35 AM, Nicolas Lamirault <
[email protected]> wrote:

Strange. I try some logs :

log.Printf("Keys: %s", viper.AllKeys())
log.Printf("Blacklist: %s", viper.GetString("blacklist"))

and :

$ bin/speedtest-v1.0.2-c-8-ga232615 -d -b http://paris1.speedtest.orange.fr/upload.php
2016/10/17 17:29:35 Keys: [numlatencytests algotype report httpdownloadtimeout ulsizes blacklist speedtestconfigurl numclosest reportchar httpconfigtimeout speedtestserversurl quiet httplatencytimeout dlsizes debug]
2016/10/17 17:29:35 Blacklist:
2016/10/17 17:29:35 STClient: &sthttp.SpeedtestConfig{ConfigURL:"http://c.speedtest.net/speedtest-config.php?x=jgkIV7zvY5LZHhWB", ServersURL:"http://c.speedtest.net/speedtest-servers-static.php?x=9anLuNni9qiLXnWR", AlgoType:"max", NumClosest:3, NumLatencyTests:5, Interface:"", Blacklist:""}


You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
#87 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AACa35NE5bbVcM2SoPVG16g7KlMOQi-4ks5q05W9gaJpZM4KNZ4m
.

@nlamirault
Copy link
Contributor Author

I try that :

$ bin/speedtest-v1.0.2-c-8-ga232615 -l|grep France
1563 | myplex.org (Gravelines, France)
...
4036 | TestDebit.info (Marseille, France)
4020 | Old-Linux.com (Perpignan, France)
bin/speedtest-v1.0.2-c-8-ga232615 -d -b 4020
2016/10/18 09:22:10 Keys: [algotype httpdownloadtimeout numclosest dlsizes quiet httplatencytimeout numlatencytests httpconfigtimeout ulsizes debug blacklist reportchar speedtestconfigur
l report speedtestserversurl]
2016/10/18 09:22:10 Blacklist: 
2016/10/18 09:22:10 STClient: &sthttp.SpeedtestConfig{ConfigURL:"http://c.speedtest.net/speedtest-config.php?x=DGXXHo6DRiSYLQno", ServersURL:"http://c.speedtest.net/speedtest-servers-sta
tic.php?x=6XEUrCVk1ze1qKUQ", AlgoType:"max", NumClosest:3, NumLatencyTests:5, Interface:"", Blacklist:""}

Any idea ?

@zpeters
Copy link
Owner

zpeters commented Oct 18, 2016

i will look some more tonight. Which commit are you working off ?

On Tue, Oct 18, 2016 at 2:24 AM, Nicolas Lamirault <[email protected]

wrote:

I try that :

$ bin/speedtest-v1.0.2-c-8-ga232615 -l|grep France
1563 | myplex.org (Gravelines, France)
...
4036 | TestDebit.info (Marseille, France)
4020 | Old-Linux.com (Perpignan, France)
bin/speedtest-v1.0.2-c-8-ga232615 -d -b 4020
2016/10/18 09:22:10 Keys: [algotype httpdownloadtimeout numclosest dlsizes quiet httplatencytimeout numlatencytests httpconfigtimeout ulsizes debug blacklist reportchar speedtestconfigur
l report speedtestserversurl]
2016/10/18 09:22:10 Blacklist:
2016/10/18 09:22:10 STClient: &sthttp.SpeedtestConfig{ConfigURL:"http://c.speedtest.net/speedtest-config.php?x=DGXXHo6DRiSYLQno", ServersURL:"http://c.speedtest.net/speedtest-servers-static.php?x=6XEUrCVk1ze1qKUQ", AlgoType:"max", NumClosest:3, NumLatencyTests:5, Interface:"", Blacklist:""}

Any idea ?


You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
#87 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AACa39QQl-mSzVOoHmuATWf1KvSIJ4wyks5q1HQ-gaJpZM4KNZ4m
.

@nlamirault
Copy link
Contributor Author

from my PR

@zpeters
Copy link
Owner

zpeters commented Oct 18, 2016

@nlamirault i made a little progress. It looks like we were overwriting the setting of blacklist in speedtest.go. once i removed the initializing line from the struct it will now read in a blacklist value. The problem now is its only reading in the first value if i specify "123, 234, 345" it will only get "123,". Can you see a way to bring in the full string?

Here is the diff

https://gist.github.com/zpeters/8882312321ebb26877fd93bfa2c1e102

@zpeters
Copy link
Owner

zpeters commented Oct 22, 2016

Tentatively fixed w/ dev 6cba4af

@zpeters
Copy link
Owner

zpeters commented Oct 22, 2016

I believe some of the blacklisting issues, timeout issues and a few other things have been resolved in this development release. Please let me know how this looks. If everything seems stable i'll push this to the main branch next week.

https://github.com/zpeters/speedtest/releases/tag/v1.0.2-c-fixes

Thank you

@zpeters zpeters closed this as completed Oct 26, 2016
@nlamirault
Copy link
Contributor Author

Great ! Congrats

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

No branches or pull requests

2 participants