blob: b43084b4ebe4c8a9bf8f32cf4c8e876b050b9be0 (
about) (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
package commitquery
import (
"runtime"
commitgraphread "codeberg.org/lindenii/furgit/format/commitgraph/read"
objectstore "codeberg.org/lindenii/furgit/object/store"
)
// New builds one concurrent-safe commit query service over one object store
// and optional commit-graph reader.
//
// Labels: Deps-Borrowed.
func New(store objectstore.ReadingStore, graph *commitgraphread.Reader) *Queries {
maxIdle := runtime.GOMAXPROCS(0)
if maxIdle < 1 {
maxIdle = 1
}
return &Queries{
store: store,
graph: graph,
maxIdle: maxIdle,
}
}
|