Commit 77986088 authored by Nick Thomas's avatar Nick Thomas

Add a Gitaly NamespaceClient

parent e510462d
......@@ -51,6 +51,15 @@ func NewRepositoryClient(server Server) (*RepositoryClient, error) {
return &RepositoryClient{grpcClient}, nil
}
func NewNamespaceClient(server Server) (*NamespaceClient, error) {
conn, err := getOrCreateConnection(server)
if err != nil {
return nil, err
}
grpcClient := pb.NewNamespaceServiceClient(conn)
return &NamespaceClient{grpcClient}, nil
}
func NewDiffClient(server Server) (*DiffClient, error) {
conn, err := getOrCreateConnection(server)
if err != nil {
......
package gitaly
import (
pb "gitlab.com/gitlab-org/gitaly-proto/go"
)
// NamespaceClient encapsulates NamespaceService calls
type NamespaceClient struct {
pb.NamespaceServiceClient
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment