inaneverb / ipstack

Unofficial Golang bindings (library) for https://ipstack.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

State of project?

mewis opened this issue · comments

commented

Hi, I know this project has not been worked on for a couple of years but I was just wondering if you are accepting pull requests?

The feature in particular I am looking at is enabling ipstack modules, I am happy to create a fork but wondered if its worth while trying to contribute?

Thank you.

Hi. It's nice to see a first issue and first PR for me.
I'm so glad you chose contribute instead of forking. If you want to add something else you're welcome.

Thank you. We can use this issue for discuss about something else what you have to add. Or I'll close it after a couple of day.
Thank you again.

commented

No worries.
I was thinking maybe added the hostname option as well
and alsoI was thinking maybe something with channels for bulk queries but I have not decided what that would be yet so please feel free to close this ticket if you like and I can create one when I get round to it.

Thank you

commented

Oh and also we should tag master so that people can update the project, I guess 0.1.1 ?

I added go.mod and tag. Dunno how go modules works with 0 as major version's index, so it's 1.0.1

Hostname for that case when user has its own ipstack API server? Guess we can but don't know a frequency of custom servers usage instead of ipstack's one. Do you use it?

About bulk queries. I have no idea why slice should be switched to the chan. Executing in a separate goroutine?
I'm thinking about switching standard encoding/json and 'http/client` to custom JSON decoder and HTTP client like ffjson and fasthttp for increase a performance but now I don't have enough time. Probably later.

commented

I was going to add a go mod on my pr but decided it against it, although Im using go 1.14

Hostname - I am not using it, I probably wont look at this

Bulk queries - My thinking (have not thought about much) was have a method like Add(ip string) and when init the client you can provide a chan for the responses and maybe num of go routines. I have not thought about this much so if I do think of it I'l create another ticket. In my case I deal with 1000's of ip's at a time so would be nice have this running in different goroutines for each 50 ip's.

json and http client - thats a nice idea. I'm the same, not much time at moment but if I do get some free time I might also have a crack at that.

Okay, I understand what do you want. Sounds well and useful but can't implement this right now (told you have no time).
Anyway. I closing this issue and guess these three things are best options what can be done (your idea of bulk queries chunk by chunk in a separate goroutines, replacing http client and json encoder).

Thank you again. You're welcome to contribute.