Documentation ¶
Index ¶
- func ReceivePack(ctx context.Context, conn *grpc.ClientConn, request *pb.SSHReceivePackRequest) (int32, error)
- func RunGitalyCommand(handler GitalyHandlerFuncWithJSON)
- func UploadArchive(ctx context.Context, conn *grpc.ClientConn, ...) (int32, error)
- func UploadPack(ctx context.Context, conn *grpc.ClientConn, request *pb.SSHUploadPackRequest) (int32, error)
- type GitalyCommand
- type GitalyConn
- type GitalyHandlerFunc
- type GitalyHandlerFuncWithJSON
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReceivePack ¶
func ReceivePack(ctx context.Context, conn *grpc.ClientConn, request *pb.SSHReceivePackRequest) (int32, error)
ReceivePack issues a Gitaly receive-pack rpc to the provided address
func RunGitalyCommand ¶
func RunGitalyCommand(handler GitalyHandlerFuncWithJSON)
RunGitalyCommand provides a bootstrap for Gitaly commands executed through GitLab-Shell. It ensures that logging, tracing and other common concerns are configured before executing the `handler`. RunGitalyCommand will handle errors internally and call `os.Exit()` on completion. This method will never return to the caller.
func UploadArchive ¶
func UploadArchive(ctx context.Context, conn *grpc.ClientConn, request *pb.SSHUploadArchiveRequest) (int32, error)
UploadArchive issues a Gitaly upload-archive rpc to the provided address
func UploadPack ¶
func UploadPack(ctx context.Context, conn *grpc.ClientConn, request *pb.SSHUploadPackRequest) (int32, error)
UploadPack issues a Gitaly upload-pack rpc to the provided address
Types ¶
type GitalyCommand ¶
func (*GitalyCommand) RunGitalyCommand ¶
func (gc *GitalyCommand) RunGitalyCommand(handler GitalyHandlerFunc) error
RunGitalyCommand provides a bootstrap for Gitaly commands executed through GitLab-Shell. It ensures that logging, tracing and other common concerns are configured before executing the `handler`.
type GitalyConn ¶
type GitalyConn struct {
// contains filtered or unexported fields
}
type GitalyHandlerFunc ¶
GitalyHandlerFunc implementations are responsible for making an appropriate Gitaly call using the provided client and context and returning an error from the Gitaly call.
type GitalyHandlerFuncWithJSON ¶
type GitalyHandlerFuncWithJSON func(ctx context.Context, client *grpc.ClientConn, requestJSON string) (int32, error)
GitalyHandlerFuncWithJSON implementations are responsible for deserializing the request JSON into a GRPC request message, making an appropriate Gitaly call with the request, using the provided client, and returning the exit code or error from the Gitaly call.