func NewActivePool(queryTimeout, idleTimeout time.Duration) *ActivePool { return &ActivePool{ pool: pools.NewNumbered(), timeout: int64(queryTimeout), connPool: NewConnectionPool(1, idleTimeout), ticks: timer.NewTimer(idleTimeout / 10), } }
func NewActiveTxPool(timeout time.Duration) *ActiveTxPool { return &ActiveTxPool{ pool: pools.NewNumbered(), lastId: time.Now().UnixNano(), timeout: int64(timeout), ticks: timer.NewTimer(timeout / 10), txStats: stats.NewTimings("Transactions"), } }
func NewSchemaInfo(queryCacheSize int, schemaReloadTime time.Duration) *SchemaInfo { self := &SchemaInfo{ QueryCacheSize: queryCacheSize, SchemaReloadTime: schemaReloadTime, ticks: timer.NewTimer(schemaReloadTime), } http.Handle("/debug/query_cache", self) return self }