Oh no,
nevermind: https://github.com/EvilSuperstars/go-cidrman/blob/master/subnet.go
:-(
On Wednesday, May 9, 2018 at 10:37:54 AM UTC-6, Augusto Roman wrote:
>
> https://godoc.org/github.com/ewbankkit/go-cidrman#Subnets
>
> On Wednesday, May 9, 2018 at 6:48:46 AM UTC-6, Anik Mazumder wrote:
>>
https://godoc.org/github.com/ewbankkit/go-cidrman#Subnets
On Wednesday, May 9, 2018 at 6:48:46 AM UTC-6, Anik Mazumder wrote:
>
> I would like to divide up a CIDR block into smaller subnets.
>
> For example if the CIDR block is 10.0.0.0/4, then I would like to spilt
> is up into multiple /8s.
>
Thanks!
I'm not willing close the connection on every request -- that's too painful.
I don't need an _exact_ count, but I want to be confident that my counts
are really close. Serializing the headers and adding the size of the body
is the closest that I've come up with to do accurate per-reque
Interesting. I wouldn't expect kernel functions to give me per-request
statistics, however, I'd expect per-process (or if I'm lucky per-thread)
statistics. Is that what you were imagining?
On Thursday, January 25, 2018 at 5:19:02 PM UTC-7, simon place wrote:
>
> i think there should be several
Huh. Is this actually not possible? (That is, without modifying net/http
directly?)
On Friday, January 19, 2018 at 12:47:06 PM UTC-7, Augusto Roman wrote:
>
> I'm interested in tracking total bandwidth on a per-request basis. It's
> easy to intercept the ResponseWriter and track the number of
I'm interested in tracking total bandwidth on a per-request basis. It's
easy to intercept the ResponseWriter and track the number of bytes sent out
for the response body, and it's easy to intercept the Request.Body to count
the number of bytes read from the remote source, but both of these igno
Use the Type:
reflect.Value.Type.String: https://play.golang.org/p/dlwjCROG6H
On Saturday, September 17, 2016 at 3:53:35 AM UTC-7, mhhcbon wrote:
>
> Hi,
>
> i m wondering if one can use reflect to extract at runtime the body and
> and signature of a Func or 'Public method' ?
> Will a reflect.Va
t;>
>>>
>>> We actually don't care if "Handle" completes in this example. We only
>>> care if that our task handler starts processing a message that it completes
>>> the processing.
>>>
>>>
>>>
>>> Than
en because you can't guarantee
>> that the tasks are all started (and have a read-lock acquired) before you
>> call close.
>>
>>
>>
>> Consider:
>>
>> h.Handle(...) <-- gets past the closed channel check, calls go ...,
>> butthe
) is called and the goroutine starts, you always
might miss a task that got called near the time Close() was called.
- Augusto
On Tuesday, September 13, 2016 at 12:50:50 PM UTC-7, Evan Digby wrote:
>
> Hi Aroman,
>
> Your approach using the WaitGroup is definitely better in this toy
The WaitGroup is better than the lock approach, since the lock approach
could block an outstanding task. The key to using waitgroups is to call
Add() outside of goroutines that might call done:
https://play.golang.org/p/QVWoy8fCmI
On Tuesday, September 13, 2016 at 12:19:16 PM UTC-7, Evan Digby
That's correct. Method receivers are equivalent to just passing as an
extra argument:
func Set(f fetcher, tname string) {
f.names = tname
}
In this case, it's obvious that Set will not affect the fetcher passed in
at the call site, in contrast to
func Set(f *fetcher, tname string) {
f.names =
You need a pointer receiver on Set. It copies the struct, sets the field
on the copy, and throws it away:
https://play.golang.org/p/mqleaL6PU3
On Tuesday, September 13, 2016 at 11:41:46 AM UTC-7, Frank Davidson wrote:
>
> I think I'm having some type of mental lapse, but can anyone tell me why
There's also decimal128 support (first via a third-party library before
inclusion into the language
itself): https://github.com/golang/go/issues/12332
=)
- Augusto
On Sunday, September 11, 2016 at 5:01:21 PM UTC-7, Pablo Rozas-Larraondo
wrote:
>
> Hi Mark,
>
> I can also suggest you to look in
On Saturday, September 3, 2016 at 10:09:09 PM UTC-7, Dave Cheney wrote:
>
> Your not seeding the random generator so the results should be identical
> each time.
Except that the random numbers are being assigned in goroutines that are
racing each other. On my system, at least one of the two go
15 matches
Mail list logo