blob: b93bab6d0f69566629ecc3641d249db5cd86fd3b (
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
|
package hook
import (
"gitlab.com/gitlab-org/gitaly/internal/git"
gitalyhook "gitlab.com/gitlab-org/gitaly/internal/gitaly/hook"
"gitlab.com/gitlab-org/gitaly/internal/streamcache"
"gitlab.com/gitlab-org/gitaly/v14/proto/go/gitalypb"
)
type server struct {
gitalypb.UnimplementedHookServiceServer
manager gitalyhook.Manager
gitCmdFactory git.CommandFactory
packObjectsCache streamcache.Cache
}
// NewServer creates a new instance of a gRPC namespace server
func NewServer(manager gitalyhook.Manager, gitCmdFactory git.CommandFactory, packObjectsCache streamcache.Cache) gitalypb.HookServiceServer {
srv := &server{
manager: manager,
gitCmdFactory: gitCmdFactory,
packObjectsCache: packObjectsCache,
}
return srv
}
|