Re: [go-nuts] How to kill all open TCP connections?

2019-02-20 Thread Wojciech S. Czarnecki
On Tue, 19 Feb 2019 10:43:12 -0800 (PST)
rlwestl...@gmail.com wrote:

> I did manage to put together a script using tcpdrop that could pick out 
> only the right connections to drop, but my code reviewer doesn't like the 
> solution; he wants to solve the problem from within Go rather than

> hack our way around it.

Even for someone without admin experience a quick search for TIME_WAIT
might point that it is a known problem and that it is one that can not be dealt 
with
just using (any) programming language on the application layer.

A "reviewer" should have known that.

The environment (server) need to be tuned to its purpose.
Talking FreeBSD -- pass to your admin (and reviewer) hints: 
"man sysctl",  "net.inet.tcp.finwait2_timeout", 
"net.inet.tcp.fast_finwait2_recycle"

There are more knobs to fiddle with, depending on expected production profile, 
but
these two are most likely to help. Standard timeout is 60s, for most recent uses
it can be tuned down to 20, 10 or even 5s.

> and the connections are left in TIME_WAIT.

That's how the tcp standard is since 1981 or so. Unless you have a control on
**both** endpoints you have no way to change that (apart from tuning kernel
to reap aggressively or use raw tools like tcpdrop)  There are other tricks
that can be implemented **by the admin/devop division** on the routing (pf)
layer.

PS IIRC for jailed environments there was a trick with 
"net.inet.tcp.nolocaltimewait";
then a forwarder set over the jail. Consult an experienced *BSD admin for more 
and possibly
more recent hints.

Hope this helps,

-- 
Wojciech S. Czarnecki
 << ^oo^ >> OHIR-RIPE

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] Why does "go mod" ignore tags in this case?

2019-02-20 Thread twpayne
tl;dr "go mod" writes a timestamp/commit hash to go.mod when a perfectly 
good tag exists. I don't understand why go.mod doesn't use the tag.


Given this library

  https://github.com/twpayne/go-xdg

with a "v2.0.0" tag:

  https://github.com/twpayne/go-xdg/releases/tag/v2.0.0

if I create a trivial program that uses it, like

  https://gist.github.com/twpayne/09e9135d3f62471ebd7c83359b081e80

when I run the go command (e.g. go build), I end up with a go.mod file that 
contains

  require github.com/twpayne/go-xdg v0.0.0-20190214203150-05c8dc503590

whereas I would expect go.mod to contain

  require github.com/twpayne/go-xdg v2.0.0

Even I run the explicit command:

  $ go get github.com/twpayne/go-xdg@v2.0.0

go.mod still ends up containing the v0.0.0/timestamp/commit hash instead of 
v2.0.0.


Why does go.mod contain v0.0.0/timestamp/commitHash instead of "v2.0.0"?


Possibly relevant information:
- I initially made a mistake tagging "v2.0.0", so the tag has moved since 
the go command first saw it. However, I also tried creating a new "v3.0.0" 
tag, but also saw the v0.0.0/timestamp/commit hash instead of the expected 
"v3.0.0".
- I have GO111MODULE=on.

Thanks for any insight :)

Tom

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] How can I try debug.SetMaxHeap?

2019-02-20 Thread Ian Lance Taylor
[ +austin ]

On Wed, Feb 20, 2019 at 11:11 AM 'Vinicius Fortuna [vee-NEE-see.oos]'
via golang-nuts  wrote:
>
> My team is struggling with limiting the head size of a Go application and 
> would like to know how to use SetMaxHeap.
>
> We wrote a VpnExtension for iOS which gets killed by the OS if is consumes 
> more than 15MB, but there's no way to tell Go to not pass that limit. I 
> learned about the debug.SetMaxHeap experiment, and it seems that may solve 
> our problem. I'm ok running a custom runtime for now.
> However, it's unclear how I can use it. it seems to be one a CL that was 
> never submitted and now has merge conflicts: 
> https://go-review.googlesource.com/c/go/+/46751
> How can I get a Go version with SetMaxHeap?
>
> Thanks
>
> Vinicius Fortuna
>
>
> --
> You received this message because you are subscribed to the Google Groups 
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to golang-nuts+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] How can I try debug.SetMaxHeap?

2019-02-20 Thread 'Vinicius Fortuna [vee-NEE-see.oos]' via golang-nuts
My team is struggling with limiting the head size of a Go application and
would like to know how to use SetMaxHeap.

We wrote a VpnExtension for iOS which gets killed by the OS if is consumes
more than 15MB, but there's no way to tell Go to not pass that limit. I
learned about the debug.SetMaxHeap experiment, and it seems that may solve
our problem. I'm ok running a custom runtime for now.
However, it's unclear how I can use it. it seems to be one a CL that was
never submitted and now has merge conflicts:
https://go-review.googlesource.com/c/go/+/46751
How can I get a Go version with SetMaxHeap?

Thanks

Vinicius Fortuna

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] Hiring Go developers at Verisart

2019-02-20 Thread rlnorton
**Who we are**
Verisart, the world's first blockchain certification platform for the art 
market, is seeking developers to join its London office in Mayfair.

If you're interested in distributed ledger technologies and want be at the 
forefront of a new decentralized title registry for creators, we want to 
hear from you.

Our clients range from ecommerce sites to galleries and leading artists 
such as Shepard Fairey. We believe the era of paper certificates is over 
and are building evidence-based methods of certifying and verifying 
artworks using AI-powered image recognition.

While understanding the mathematical fundamentals of cryptography is great, 
it's not essential if you appreciate how cryptographic techniques like 
hashing and message signing work together to solve real problems.

Above all we want people with passion and an entrepreneurial drive willing 
to work in a small team alongside exceptional talents.

For more information, please visit our website: http://verisart.com

**What we’re looking for**
We’re currently seeking a Senior Golang Backend Engineer to take a leading 
role in developing the Verisart platform, joining our team in the heart of 
Mayfair, London.

**Responsibilities:**
- Taking a leading role in architectural design of the Verisart platform 
- Developing new service while incrementally improving the system’s current 
features 
- Applying testing principles and liaise with QA engineers to track and 
improve product robustness 
- Supporting the ongoing refactoring and improvement of the Verisart 
codebase 
- Working within an agile methodology, driven by weekly sprints 
- Supporting the business team by providing valuable input on the 
development roadmap for the product

**Minimum qualifications**
- 2+ years experience with Go
- Extensive experience with automated testing
- Experience designing and maintaining RESTful APIs in production
- 2+ years experience with relational databases, ideally Postgres
- Experience designing and implementing microservices architecture
- Experience building well-structured, easily maintainable, well-documented 
code
- Experience with cloud technologies (Heroku, AWS or Google Cloud)
- Interest in Blockchain and Bitcoin

**Desired qualifications**
- Experience in security and cryptography is an asset
- Experience with DevOps (build automation, Docker, CI/CD, alerting, 
monitoring)
- Experience with JavaScript/React

**What we offer**
- Competitive salary and a chance to shape the art market’s use of 
blockchain technology
- Flexible working hours / work from home
- Opportunity to join an employee options scheme and own a part of Verisart
- Beautiful, bright workspace in Mayfair, London with good transport links

Please email j...@verisart.com to get started!

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Visual Studio Code oddity with Go

2019-02-20 Thread Mohamed Yousif
Visual studio code has a very active GitHub repository, you can definitely
get a better support there.

On Wed, 20 Feb 2019 at 4:14 PM, Rich  wrote:

> I tried googling this but I not been able to find a solution, hopefully I
> can ask this here and someone else knows how to fix this.  I use Visual
> Studio Code -- because it's free. The issue I am having is that every time
> I use Visual Studio Code I get the popup that says:
>
> The Go extension is better with the latest version of "gocode".  Use "go
>> get -u -v github.com/mdempsky/gocode" to update
>
>
> Anyone else have this or know how to fix this? It shouldn't ask EVERY time
> I use Visual Studio Code?
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] Visual Studio Code oddity with Go

2019-02-20 Thread Rich
I tried googling this but I not been able to find a solution, hopefully I 
can ask this here and someone else knows how to fix this.  I use Visual 
Studio Code -- because it's free. The issue I am having is that every time 
I use Visual Studio Code I get the popup that says: 

The Go extension is better with the latest version of "gocode".  Use "go 
> get -u -v github.com/mdempsky/gocode" to update


Anyone else have this or know how to fix this? It shouldn't ask EVERY time 
I use Visual Studio Code? 

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] Go Lang - Need Help

2019-02-20 Thread Merry
I am new to aws 

Could anybody help me to write a lambda function which i need read the 
cognio user log events, i have found i can trigger a lamdab from Cognio 
?User pool in pre sign up and post sign up  , but i wond understanf how can 
i getthe log events like user login, loug, password change, Fail to login 
etc, does anybody can help

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.