Skip to content

Instantly share code, notes, and snippets.

@shaunlee
shaunlee / ConnectionPoolWrapper.go
Last active September 10, 2017 21:35 — forked from rday/gist:3504674
Connection Pool
type InitFunction func() (interface{}, error)
type ConnectionPoolWrapper struct {
size int
pool chan interface{}
}
/**
Call the init function size times. If the init function fails during any call, then
the creation of the pool is considered a failure.