blob: 7f3b0b09894b6a9a6cbeb7990400355740d7a47e (
plain)
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
26
27
28
29
30
|
package cleanup
import (
"gitlab.com/gitlab-org/gitaly/v15/internal/git"
"gitlab.com/gitlab-org/gitaly/v15/internal/git/catfile"
"gitlab.com/gitlab-org/gitaly/v15/internal/git/localrepo"
"gitlab.com/gitlab-org/gitaly/v15/internal/git/repository"
"gitlab.com/gitlab-org/gitaly/v15/internal/gitaly/storage"
"gitlab.com/gitlab-org/gitaly/v15/proto/go/gitalypb"
)
type server struct {
gitalypb.UnimplementedCleanupServiceServer
locator storage.Locator
gitCmdFactory git.CommandFactory
catfileCache catfile.Cache
}
// NewServer creates a new instance of a grpc CleanupServer
func NewServer(locator storage.Locator, gitCmdFactory git.CommandFactory, catfileCache catfile.Cache) gitalypb.CleanupServiceServer {
return &server{
locator: locator,
gitCmdFactory: gitCmdFactory,
catfileCache: catfileCache,
}
}
func (s *server) localrepo(repo repository.GitRepo) *localrepo.Repo {
return localrepo.New(s.locator, s.gitCmdFactory, s.catfileCache, repo)
}
|