sourcegraph/internal/codeintel/context/init.go
Noah S-C 9333f8f283
codeintel: consolidate enterprise & oss codeintel packages (#54431)
Movin enterprise codeintel stuff (and ~two others that had to be dragged
along) out of `enterprise/internal` and into `internal` as part of the
shift towards enterprise-only

## Test plan

Successfully built frontend with bazel, CI will check the rest
😎 no logic changed, just shufflin things around
2023-07-05 14:58:41 +01:00

24 lines
595 B
Go

package context
import (
"github.com/sourcegraph/sourcegraph/internal/codeintel/context/internal/store"
"github.com/sourcegraph/sourcegraph/internal/database"
"github.com/sourcegraph/sourcegraph/internal/observation"
)
func NewService(
observationCtx *observation.Context,
db database.DB,
) *Service {
store := store.New(scopedContext("store", observationCtx), db)
return newService(
observationCtx,
store,
)
}
func scopedContext(component string, parent *observation.Context) *observation.Context {
return observation.ScopedContext("codeintel", "context", component, parent)
}